我在学习Help中WTP Tutorials - JavaServer Faces Tools Tutorial中的例子
配置都完成了,插入一个纯jsp网页运行也没问题,可是在随意插入一个commandButton之后出现如下错误。
org.apache.jasper.JasperException: An exception occurred processing JSP page /login.jsp at line 129: </head>
10: <body>
11:
12: <f:view>
13: <h:form>
14: <h:commandButton></h:commandButton>
15: </h:form>请问各位大虾,问题可能出在哪?
源程序如下
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%><%@taglib
uri="http://java.sun.com/jsf/html" prefix="h"%><%@ page language="java" contentType="text/html; charset=GB18030"
pageEncoding="GB18030"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
<title>Insert title here</title>
</head>
<body><f:view>
<h:form>
<h:commandButton></h:commandButton>
</h:form>
</f:view>
</body>
</html>小弟谢谢各位了,顶者有分!
配置都完成了,插入一个纯jsp网页运行也没问题,可是在随意插入一个commandButton之后出现如下错误。
org.apache.jasper.JasperException: An exception occurred processing JSP page /login.jsp at line 129: </head>
10: <body>
11:
12: <f:view>
13: <h:form>
14: <h:commandButton></h:commandButton>
15: </h:form>请问各位大虾,问题可能出在哪?
源程序如下
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%><%@taglib
uri="http://java.sun.com/jsf/html" prefix="h"%><%@ page language="java" contentType="text/html; charset=GB18030"
pageEncoding="GB18030"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
<title>Insert title here</title>
</head>
<body><f:view>
<h:form>
<h:commandButton></h:commandButton>
</h:form>
</f:view>
</body>
</html>小弟谢谢各位了,顶者有分!
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%> <%@taglib
uri="http://java.sun.com/jsf/html" prefix="h"%> <%@ page language="java" contentType="text/html; charset=GB18030"
pageEncoding="GB18030"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
<title>Insert title here </title>
</head>
<body> <f:view>
<h:form id="simpleForm">
<h:commandButton id="submit" value="提交" > </h:commandButton>
</h:form>
</f:view>
</body>
</html>
这次试探性的没把/faces/*删除,竟然好用了.楼上这位朋友的代码我试了,还是有问题,不过还是谢谢您!
谢谢了!
M_song 你也有这个默认值么?ps:谢谢M_song!
把jsf和jstl导入就成了,甚至没有写参数的地方。所以觉得莫名其妙。ps:谢谢M_song的关注,中午前我就结贴。
<!-- Faces Servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet><!-- Faces Servlet Mapping -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>