页面代码:function gotoReg(){
window.location.href = "gotoreg.do";
}controller代码:@Controller
public class UserController {
@RequestMapping("/gotoreg.do")
public String gotoreg(){
return "reg";
}
}
我的页面是放在WEB-INF/jsp/目录下,不能直接跳过去,就想这样跳转.
但是报404,找不到gotoreg.do.
求解,谢谢!
window.location.href = "gotoreg.do";
}controller代码:@Controller
public class UserController {
@RequestMapping("/gotoreg.do")
public String gotoreg(){
return "reg";
}
}
我的页面是放在WEB-INF/jsp/目录下,不能直接跳过去,就想这样跳转.
但是报404,找不到gotoreg.do.
求解,谢谢!
解决方案 »
- CDI中在同一页面注入相同的bean
- 局部提交刷新页面
- struts2 接收不到参数,那个高手帮忙看看呀
- 在junit的Testcase中起了一个线程,但是线程内的操作还没有做完,就自动终止了。
- JDBC3.0问题 是高手就进来看看
- EJB运行出错,望各位大哥帮忙!!!
- 请问启动weblogic后,打开页面出现servlet错误如何解决~~
- eclipse 和 TOMCAT5.0 和struts的编译
- 关于使用socket开发通信程序的有关问题
- 关于电子商务系统流程的疑问
- 在做bbs的主题编辑功能,不知道怎么把主题数据赋值给HtmlEditor编辑器来进行编辑,会的指教一下。
- 高手过来指点一下啊,关于java web线程的啊
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
这里有basePath你打印一下看看是什么。
想办法把它加进去
还有就是
".."意思是跳出当前文件夹目录。
eg:window.location.href = "../gotoreg.do";跳到你想跳到的位置。