配置是默认的jbx配置:
index.jsp页面有:
<html:errors/>
<p>
<html:form action="/login.do" method="POST">
web.xml有:
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
struts-config有:
<action-mappings>
<action input="/index.jsp" name="loginForm" path="/login" scope="session" type="com.lionchina.LoginAction" validate="true" >
<forward name="success" path="/result.jsp">
</forward>
<forward name="failur" path="/index.jsp">
</forward>
</action>
</action-mappings>
result.jsp有:
username:<%=request.getAttribute("username")%>
<br />
password:<%=request.getAttribute("password")%>
index.jsp页面有:
<html:errors/>
<p>
<html:form action="/login.do" method="POST">
web.xml有:
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
struts-config有:
<action-mappings>
<action input="/index.jsp" name="loginForm" path="/login" scope="session" type="com.lionchina.LoginAction" validate="true" >
<forward name="success" path="/result.jsp">
</forward>
<forward name="failur" path="/index.jsp">
</forward>
</action>
</action-mappings>
result.jsp有:
username:<%=request.getAttribute("username")%>
<br />
password:<%=request.getAttribute("password")%>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货