日期:2014-05-18  浏览次数:20692 次

jsp打包问题
请教一个问题:我做的jsp打包后
http://localhost:8080/courseCheck/index.jsp
然后提交就成了
http://localhost:8080/loginAction.do
这到底是哪里错了

------解决方案--------------------
按你的想法应该到哪里?
------解决方案--------------------
你的程序应当是基于struts的应用,检查一下你的web.xml和struts-config.xml文件
------解决方案--------------------
关注
------解决方案--------------------
我估计你的表单是这样写的
<form action= "/loginAction.do ">
..
</form>

这样写是有问题的.
那个“/”代表的意思是站点根目录,也就是代表8080后面的 "/ ",所以要么把/去掉,要么写成
<form action= "${pageContext.request.contextPath}/loginAction.do ">

------解决方案--------------------
请教一个问题:我做的jsp打包后
http://localhost:8080/courseCheck/index.jsp
然后提交就成了
http://localhost:8080/loginAction.do
这到底是哪里错了

加上context