按教程复制代码运行时出现错误 /pages/welcome.jsp(3,45) equal symbol expected
hailong4688199
2010-01-14
严重: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: /pages/welcome.jsp(3,45) equal symbol expected at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40) at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407) at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:88) at org.apache.jasper.compiler.Parser.parseAttribute(Parser.java:194) at org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:144) at org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:157) at org.apache.jasper.compiler.ParserController.getPageEncodingForJspSyntax(ParserController.java:435) at org.apache.jasper.compiler.ParserController.determineSyntaxAndEncoding(ParserController.java:378) at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:170) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:101) welcome.jsp的代码: <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@page contentType="text/html;charset=UTF-8"%> <html> <head> <title>第一个JSF程序</title> </head> <body> <f:view> <h:outputText value = "#{user.name}"/> 您好! <h3>欢迎使用 JavaServer Faces!</h3> </f:view> </body> </html> face配置文件: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd"> <faces-config> <navigation-rule> <from-view-id>/pages/index.jsp</from-view-id> <navigation-case> <from-outcome>login</from-outcome> <to-view-id>/pages/welcome.jsp</to-view-id> </navigation-case> </navigation-rule> <managed-bean> <managed-bean-name>user</managed-bean-name> <managed-bean-class>onlyfun.test.UserBean</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> </managed-bean> </faces-config> |
|
terryzhou
2010-01-14
贴你输入的URL和WEB.XML
|
|
hailong4688199
2010-01-15
web.xml:
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <context-param> <param-name>javax.faces.CONFIG_FILES</param-name> <param-value>/WEB-INF/faces-config.xml</param-value> </context-param> <servlet> <servlet-name>Faces Servlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> <load-on-startup>0</load-on-startup> </servlet> <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>*.faces</url-pattern> </servlet-mapping> </web-app> url:http://localhost:8080/JSFtest/pages/index.faces |
|
hailong4688199
2010-01-15
不好意思,好像是我部署出错了。。。
|
相关讨论
相关资源推荐
- 国际跳棋软件(dragon-2.4.1)
- 跳棋游戏—backbone框架开发
- 作为学科的计算科学(上、中、下)
- 作为学科的计算科学(中)
- struts2+spring+hibernate整合中spring注入出错。页面中报空指针异常。高手来看看怎么决绝。
- spring与struts2整合方式
- spring整合struts@Autowired注入为空指针
- struts2与spring整合时,报空指针NullPointerException异常的解决
- struts整合spring,action中用spring注入时,hibernateTemplate空指针
- spring整合struts2,action里的service注入,空指针异常