jsp: login.jsp
ActionForm: LoginActionForm
Action: LoginAction开发工具:Jbuilder2005
直接在jbuilder上运行login.jsp,能运行,填写表单,提交后,可以跳转到/loginAction.do,可是却没有了反应
我在excute方法中已经添加了跳转的mapping,如果是success就跳转到success.jsp,fail就跳转到fail.jsp,struts-config.xml中也没有问题login.jsp中的form代码:
<html:form action="/loginAction.do" method="POST">
<html:text property="mima"/>
<br>
<html:text property="mingzi"/>
<br>
<html:submit property="submit" value="Submit"/><br>
<html:reset value ="Reset"/>
</html:form>execute代码:
if(loginActionForm.getMingzi().equalsIgnoreCase("zhangsan")
&&loginActionForm.getMima().equals("123"))
{
return actionMapping.findForward("success");
}
return actionMapping.findForward("fail");
ActionForm: LoginActionForm
Action: LoginAction开发工具:Jbuilder2005
直接在jbuilder上运行login.jsp,能运行,填写表单,提交后,可以跳转到/loginAction.do,可是却没有了反应
我在excute方法中已经添加了跳转的mapping,如果是success就跳转到success.jsp,fail就跳转到fail.jsp,struts-config.xml中也没有问题login.jsp中的form代码:
<html:form action="/loginAction.do" method="POST">
<html:text property="mima"/>
<br>
<html:text property="mingzi"/>
<br>
<html:submit property="submit" value="Submit"/><br>
<html:reset value ="Reset"/>
</html:form>execute代码:
if(loginActionForm.getMingzi().equalsIgnoreCase("zhangsan")
&&loginActionForm.getMima().equals("123"))
{
return actionMapping.findForward("success");
}
return actionMapping.findForward("fail");
解决方案 »
- servlet传参数给HTML,结果是乱码,如何解决?
- 关于HIBERNATE的formula问题
- SSH延迟初始化中一个匪夷所思的问题
- 数据库连接异常(TCP/IP),连接失败(我是新手)
- 判断 window.opener ,window.opener.top ,window.top 是否存在
- 寻武汉市.net和JSP建站编程高手
- jsp 定位 下拉列表
- logic:iterate中遍历List的问题,很急,求助
- 招聘JAVA软件工程师(北京)
- 我知道大家不屑于回答这样的问题,但是小弟真的很迷茫~! 请大家帮帮我这个program路上的迷途羔羊吧!!!
- 急求助!!!
- select top 10 * from(select top 10 * from (select top 20+10 * from a order by id desc)as b order by id asc)as c order by id d
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">
<struts-config>
<form-beans>
<form-bean name="loginActionForm" type="chapter17f.LoginActionForm" />
</form-beans>
<action-mappings>
<action name="loginActionForm" path="/loginAction" scope="request" type="chapter17f.LoginAction">
<forward name="success" path="/success.jsp" />
<forward name="fail" path="/fail.jsp" />
</action>
</action-mappings>
</struts-config>
<html:text property="mima"/>
<br>
<html:text property="mingzi"/>
<br>
<html:submit property="submit" value="Submit"/> <br>
<html:reset value ="Reset"/>
</html:form>