struts-config.xml中配置为:......
<action path="/displayUser" type="com.yourcompany.struts.action.DisplayUserAction">
<forward name="display" path="/displayUser.jsp" />
</action>
<action path="/deleteUser" type="com.yourcompany.struts.action.DeleteUserAction">
<forward name="deleteuser" path="/cdrent/displayUser.do" />
</action>
......本来设计的目的是在删除用户成功时转向用户显示页面,莫非是<forward name="deleteuser" path="/cdrent/displayUser.do" />里的path不能这样设置,错误提示为:Invalid path was requested。补充:我用的是struts1.2
<action path="/displayUser" type="com.yourcompany.struts.action.DisplayUserAction">
<forward name="display" path="/displayUser.jsp" />
</action>
<action path="/deleteUser" type="com.yourcompany.struts.action.DeleteUserAction">
<forward name="deleteuser" path="/cdrent/displayUser.do" />
</action>
......本来设计的目的是在删除用户成功时转向用户显示页面,莫非是<forward name="deleteuser" path="/cdrent/displayUser.do" />里的path不能这样设置,错误提示为:Invalid path was requested。补充:我用的是struts1.2
解决方案 »
- hibernate的缓存机制
- 谁能给个多表异步动态树的示例给我
- select表单,好像一定要用js,但是现在还没怎么用过,时间紧迫,大家帮我想个办法啊
- 一个关于iterator的问题?搜索过以前没有找到答案!
- windows server 2003 tomcat 端口问题
- Applet问题(在applet中能实现让文字响应鼠标时间嘛?急!!!)
- 验证码的作用?
- jsp中文乱码,我要疯啦!(w2k+jswdk+jdk1.4.1)
- 能否将JSP中的变量传到ASP中
- 这是什么错误??/XXX.jsp(4,0) jsp.error.language.multiple
- getHibernateTemplate().save()不能向数据库中插入数据
- 求救有关Jsp程序
<forward name="deleteuser" path="/cdrent/displayUser.do" />
</action> Invalid path was requested就是路径错误
你说你删除时出现错误
你的<forward name="deleteuser" path="/cdrent/displayUser.do" />
这个路径应该有问题
不是的,Forward可以指向另一个Action,
但你的路径中的“cdrent”是什么?因为我看你其它的Action都直接定义在/下,而这个转向为什么多了一个cdrent,
如果这个是你的项目名(tomcat/webapps下的子目录名,则不要加这个名字)。