进入index.jsp页面不能识别<f:view>标签
页面代码是这个
<%@ 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=Big5 "%>
<html>
<head>
<title> 第一個JSF程式 </title>
</head>
<body>
<f:view>
<h:form>
<h3> 請輸入您的名稱 </h3>
<h:outputText value= "#{user.errMessage} "/> <p>
名稱: <h:inputText value= "#{user.name} "/> <p>
密碼: <h:inputSecret value= "#{user.password} "/> <p>
<h:commandButton value= "送出 "
action= "#{user.verify} "/>
</h:form>
</f:view>
</body>
</html>
提示这个错误:
org.apache.jasper.JasperException: Exception in JSP: /index.jsp:9
6: <title> 材JSF祘Α </title>
7: </head>
8: <body>
9: <f:view>
10: <h:form>
11: <h3> 叫块眤嘿 </h3>
12: <h:outputText value= "#{user.errMessage} "/> <p>
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handle
JspException(JspServletWrapper.java:504)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
java.lang.NullPointerException javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:929)
javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:310)
org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:70)
org.apache.jsp.index_jsp._jspx_meth_f_view_0(index_jsp.java:101)
org.apache.jsp.index_jsp._jspService(index_jsp.java:76)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)