点击一个按钮实现跳转页面(这个按钮在departmentInfo.jsp这个页面中) <div align="center">
<input name="Goback" type="button" onClick="window.location.href=MaintainDepartment.jsp;" value="返回" />
</div>但是跳转不成功,错误如下:
The requested resource (/UPCOA/servlet/MaintainDepartment.jsp) is not available.MaintainDepartment.jsp实际路径是/UPCOA/MaintainDepartment.jsp。servlet不知怎么冒出来的。还有departmentInfo.jsp页面我是通过如下方法进入的:
rd = getServletConfig().getServletContext().getRequestDispatcher("/departmentInfo.jsp");
rd.forward(request, response);是不是和路径有关,请问要怎么改?谢谢!
<input name="Goback" type="button" onClick="window.location.href=MaintainDepartment.jsp;" value="返回" />
</div>但是跳转不成功,错误如下:
The requested resource (/UPCOA/servlet/MaintainDepartment.jsp) is not available.MaintainDepartment.jsp实际路径是/UPCOA/MaintainDepartment.jsp。servlet不知怎么冒出来的。还有departmentInfo.jsp页面我是通过如下方法进入的:
rd = getServletConfig().getServletContext().getRequestDispatcher("/departmentInfo.jsp");
rd.forward(request, response);是不是和路径有关,请问要怎么改?谢谢!
解决方案 »
- java问题
- 数据无法显示 急 急 急
- 遇到的奇怪的问题
- 高手帮帮忙,哪里的问题????oracle
- weblogic的一个奇怪的问题
- jsp+servelet+javabean+sqlserver2005学生成绩管理系统中updateservelet怎样编写
- 散分!
- 各位好:有没有人知道介绍java开发工具的新点的资料、站点信息还有与java相关的如ejb.j2ee,javabean....等的综述性资料
- jacob excel转PDF报错
- springMVC给EasyUi返回后台查询的数据就显示json串
- 求Java混淆加密JavaScript的代码
- 如何实现点击文字实现跳转页面并且传递数据?
试下 ../MaintainDepartment.jsp
<input name="Goback" type="submit" value="返回" />
</form>
<div align="center">
<input name="Goback" type="button" onClick="window.location.href='2.html'" value="返回" />
</div>
你少了两个单引号。 跟form没有关系。