Invalid path was requested-无效的路径被要求!!怎么回事?

qiuxixi1217 2009-05-01 09:56:55
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
...全文
3469 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
mfhappy 2010-03-29
  • 打赏
  • 举报
回复
Forward可以指向另一个Action,但是还需要一点其它的配置。具体的现在忘记了,可以在baidu上搜索下。
jinxfei 2009-05-01
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 qiuxixi1217 的回复:]
这个路径绝对没问题,我用超链接引用过此路径,可以的,在上面删除功能实现了,就是转向出现错误。我想知道在forward中转向是否只能是jsp页面?可不可以使上面那种方式
[/Quote]

不是的,Forward可以指向另一个Action,
但你的路径中的“cdrent”是什么?

因为我看你其它的Action都直接定义在/下,而这个转向为什么多了一个cdrent,
如果这个是你的项目名(tomcat/webapps下的子目录名,则不要加这个名字)。
caykaka 2009-05-01
  • 打赏
  • 举报
回复
估计forward要转向jsp吧
qiuxixi1217 2009-05-01
  • 打赏
  • 举报
回复
这个路径绝对没问题,我用超链接引用过此路径,可以的,在上面删除功能实现了,就是转向出现错误。我想知道在forward中转向是否只能是jsp页面?可不可以使上面那种方式
  • 打赏
  • 举报
回复
<action path="/deleteUser" type="com.yourcompany.struts.action.DeleteUserAction">
<forward name="deleteuser" path="/cdrent/displayUser.do" />
</action>

Invalid path was requested就是路径错误
你说你删除时出现错误
你的<forward name="deleteuser" path="/cdrent/displayUser.do" />
这个路径应该有问题
Delphi 7.1 Update Release Notes=======================================================This file contains important supplemental and late-breakinginformation that may not appear in the main productdocumentation, and supersedes information contained in otherdocuments, including previously installed release notes.Borland recommends that you read this file in its entirety.NOTE: If you are updating a localized version of Delphi 7, visit the Borland Registered User web site to obtain a localized readme file that may contain important late- breaking information not included in this readme file.IMPORTANT: Delphi must be closed before installing this update. =====================================================CONTENTS * INSTALLING THIS UPDATE * UPDATING LOCALIZED VERSIONS OF DELPHI 7 * KNOWN ISSUES * ISSUES ADDRESSED BY THIS UPDATE - IDE - CORE DATABASE - DATASNAP - DBGO (ADO COMPONENTS) - dbExpress - dbExpress COMPONENTS AND DB VCL - dbExpress CORE DRIVER AND METADATA - dbExpress VENDOR ISSUES - dbExpress CERTIFICATION - WEB SNAP - ACTIVEX - COMPILER - RTL - VCL - THIRD PARTY - BOLD FOR DELPHI * VERIFYING THAT THE UPDATE WAS SUCCESSFUL * FILES INSTALLED BY THIS UPDATE =======================================================INSTALLING THIS UPDATE* This update can not be applied to Delphi 7 Architect Trial version. * This update can not be removed after it is installed.* You will need the original Delphi 7 installation CD available to install this update.* To install this update from the CD, insert the CD, and launch the d7_ent_upd1.exe file appropriate for your locale.* To install this update from the Web, double-click the self-executing installation file and follow the prompts. * The Delphi 7 documentation PDF files are available on the update CD.========================================================UPDATING LOCALIZED VERSIONS OF DELPHI 7* This update can be applied only to the English version of Delphi 7. There are separate updates for the German, French and Japanese ver

81,090

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧