我在登录的按钮下写了跳转到一个action的页面,代码如下:
this.getEl().dom.action='/rsgl/login.do?username='+username+'&'+'password='+password;
并在相应的loinAction下接收了相应的参数,代码如下:
* @struts.action-forward name="success" path="/xtkzMain.jsp" contextRelative="true"
* @struts.action-forward name="failure" path="/login.jsp"
// 获取提交的用户名:
String strUserName = request.getParameter("username");
// 获取提交的密码:
String strPassword = request.getParameter("password");
Ctlm06 ctlm06 = ctlm06Service.getUserInf(strUserName,strUserName);
if(ctlm06!=null){ //表示成功登陆
return mapping.findForward("success");}
else{
return mapping.findForward("failure");
}
结果在成功进入主页="/xtkzMain.jsp后,浏览器的地址栏还是显示http://localhost:8080/rsgl/login.do?username=1&password=1。
请问各位大哥大姐们怎么才能使得地址栏显示为:
http://localhost:8080/rsgl/xtkzMain.jsp呢????
this.getEl().dom.action='/rsgl/login.do?username='+username+'&'+'password='+password;
并在相应的loinAction下接收了相应的参数,代码如下:
* @struts.action-forward name="success" path="/xtkzMain.jsp" contextRelative="true"
* @struts.action-forward name="failure" path="/login.jsp"
// 获取提交的用户名:
String strUserName = request.getParameter("username");
// 获取提交的密码:
String strPassword = request.getParameter("password");
Ctlm06 ctlm06 = ctlm06Service.getUserInf(strUserName,strUserName);
if(ctlm06!=null){ //表示成功登陆
return mapping.findForward("success");}
else{
return mapping.findForward("failure");
}
结果在成功进入主页="/xtkzMain.jsp后,浏览器的地址栏还是显示http://localhost:8080/rsgl/login.do?username=1&password=1。
请问各位大哥大姐们怎么才能使得地址栏显示为:
http://localhost:8080/rsgl/xtkzMain.jsp呢????