不管是success还是failer,总的跳转到对应的success.JSP或者 fail.jsp,
但是,当我运行后,它会停在以空白页面,地址栏中显示的是:http://localhost:8088/StrutsinAction/register.do
(偶尔还会附带:jsessionid=A134BE081612A8387FCA95C0727D073A)
为什么?盼望解答!
PS:config.xml
name="RegisterForm"
scope="request"
input="/register.jsp" >
register.jsp
UserName:
enter password:
re-enter password:
Action中的业务很简单,就是判断username等不等于admin,
if (username.equals("admin")) {
return mapping.findForward("success");
}
else {
ActionMessages messages=new ActionMessages();
messages.add(ActionMessages.GLOBAL_MESSAGE,new ActionMessage("login failer"));
this.saveMessages(request, messages);
return mapping.findForward("failer");
}
[该贴被hwangita于2007年04月23日 11:52修改过]