错误:
Struts has detected an unhandled exception: Messages: com.meishi.action.indexAction
Unable to instantiate Action, com.meishi.action.indexAction, defined for 'index' in namespace '/back'com.meishi.action.indexAction 页面:
<SCRIPT type="text/javascript">
setTimeout("loady()", 3000);
function loady(){
window.location='index.action';
}
</SCRIPT> </head>
<body>
成功登陆!!3秒后为你自动跳转<br/>
如果页面没有自动加载,请
<a href="index.action">单击这里</a>
</body>
问题是:登录成功后,也跳转到了这个页面,3秒后跳转时出错了。
主要是地址栏多了一个namespace:
http://localhost:8080/meishi_final/back/index.action正确地址应该是
http://localhost:8080/meishi_final/index.action
---------------------------------------------------------------
追加一个问题:
自动跳转,怎么解决不同浏览器跳转方式不同
IE:
setTimeout("loady()", 3000);
function loady(){
window.location.href='../index.action';
}Firefox:
setTimeout("loady()", 3000);
function loady(){
window.location.href='index.action';
}
Struts has detected an unhandled exception: Messages: com.meishi.action.indexAction
Unable to instantiate Action, com.meishi.action.indexAction, defined for 'index' in namespace '/back'com.meishi.action.indexAction 页面:
<SCRIPT type="text/javascript">
setTimeout("loady()", 3000);
function loady(){
window.location='index.action';
}
</SCRIPT> </head>
<body>
成功登陆!!3秒后为你自动跳转<br/>
如果页面没有自动加载,请
<a href="index.action">单击这里</a>
</body>
问题是:登录成功后,也跳转到了这个页面,3秒后跳转时出错了。
主要是地址栏多了一个namespace:
http://localhost:8080/meishi_final/back/index.action正确地址应该是
http://localhost:8080/meishi_final/index.action
---------------------------------------------------------------
追加一个问题:
自动跳转,怎么解决不同浏览器跳转方式不同
IE:
setTimeout("loady()", 3000);
function loady(){
window.location.href='../index.action';
}Firefox:
setTimeout("loady()", 3000);
function loady(){
window.location.href='index.action';
}
2>.相关jsp看一下。
<default-action-ref name="index"></default-action-ref>
<action name="index" class="com.meishi.action.IndexAction">
<result>/index.jsp</result>
</action>
</package>
登录成功的jsp
<SCRIPT type="text/javascript">
setTimeout("loady()", 3000);
function loady(){
//window.location.href='index.action';
window.location.href='${basePath}/index.action';
}
</SCRIPT>
</head>
<body>
<s:property value="#session.user.uname"/>
|<s:property value="#session.user.uid"/><br/>
<a href="back/User_modifyInput?id=<s:property value="#session.user.uid"/>">测试修改我的资料</a>
<hr>
成功登陆!!3秒后为你自动跳转<br/>
如果页面没有自动加载,请
<a href="index.action">单击这里</a>
<s:debug></s:debug>
</body>
不要写任何东西