2014-08-28 25 views
1

我想從用戶界面輸入用戶名和密碼,並在表單bean class.USing中驗證它apache tomcat 6.0即使在添加struts jar我得到錯誤「org.apache.jasper.JasperException:發生處理JSP頁面的異常」

<%@taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%> 
<%@taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %> 

<html> 
    <head> 
     <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> 
     <title>Login page | Hello World Struts application in Eclipse</title> 
    </head> 
    <body> 
    <h1>Login</h1> 
    <html:form action="login"> 
     <bean:message key="label.username" /> 
     <html:text property="userName"></html:text> 
     <html:errors property="userName" /> 
     <br/> 
     <bean:message key="label.password"/> 
     <html:password property="password"></html:password> 
     <html:errors property="password"/> 
     <html:submit/> 
     <html:reset/> 
    </html:form> 
    </body> 
</html> 
+0

請提供完整的堆棧跟蹤。你在使用哪個網站或應用程序服務器? – 2014-08-28 07:45:16

+0

apache tomcat 6.0 – user3616360 2014-08-28 09:14:57

+0

請提供堆棧跟蹤,因爲如果沒有看到它就不可能說出來。 – 2014-08-28 11:22:42

回答

0

您正在使用Struts 1.1標記。

使用Struts 1.2,1.3標籤:

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %> 
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %> 

可能重複:Error in creating jsp file
編號:http://struts.apache.org/release/1.3.x/struts-taglib/index.html

使用Struts 2個標籤: <%@標籤庫前綴= 「S」 URI = 「/ struts-tags」%>
Ref:http://struts.apache.org/release/2.3.x/docs/using-tags.html

相關問題