在线急问:struts多模块问题!

wingoal 2006-11-03 11:13:23
--------------------文件目录------------------------------
webroot
--|web.xml
--|struts-config.xml
--|strust-config.test.xml
--|WEB-INF
---||test
----|||one.jsp
----|||two.jsp

-------------------web.xml-------------------------------
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>config/test</param-name>
<param-value>/WEB-INF/struts-config-test.xml</param-value>
</init-param>
------------------struts-config-dealviewer.xml--------------------------------
<action-mappings>
<action path="/loginDo" type="com.test.action.LoginDoAction">
<forward name="login" path="/two.jsp"/>
</action>
</action-mappings>
------------------------one.jsp--------------------------------
...
<html:link action="/loginDo" module="/test"> This a struts one page. </html:link>
...
----------------------loginDoaction.java-------------------------------
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
System.out.println("***********loginDo*****************");
return mapping.findForward("login");
}

---------------------------------------------------------------------
现在在在one.jsp中点击link的时候后台能打印loginDoaction.java中的System.out.println....
但是就是显示不出two.jsp
---HTTP Status 404 - /test/two.jsp

type Status report

message /dealviewer/two.jsp

description The requested resource (/dealviewer/two.jsp) is not available.

--------------------------------------------------------------

...全文
238 17 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
17 条回复
切换为时间正序
请发表友善的回复…
发表回复
wingoal 2006-11-03
  • 打赏
  • 举报
回复
现在弄网络啊.呆会上啊.不好意思
wingoal 2006-11-03
  • 打赏
  • 举报
回复
你能上MSN么?
qin_huaping@hotmail.com
allright_flash 2006-11-03
  • 打赏
  • 举报
回复
两个文件的目录你告诉我
404错误是找不到文件的错误。
wingoal 2006-11-03
  • 打赏
  • 举报
回复
但是我在我的IE中直接写地址http://localhost:8080/test/test/two.jsp也不能访问啊?
allright_flash 2006-11-03
  • 打赏
  • 举报
回复
文件找不到
allright_flash 2006-11-03
  • 打赏
  • 举报
回复
可以的
allright_flash 2006-11-03
  • 打赏
  • 举报
回复
重新启动tomcat了吗?
wingoal 2006-11-03
  • 打赏
  • 举报
回复
allright_flash() ,还是不行啊.
HTTP Status 404 - /test/two.jsp

--------------------------------------------------------------------------------

type Status report

message /dealviewer/two.jsp

description The requested resource (/test/two.jsp) is not available.


-----------再问一下,如果我的JSP模块放在web-inf目录下.能不能用绝对路径访问.比如说我的two.jsp 可不可以用:http://localhost:8080/test/test/two.jsp




wingoal 2006-11-03
  • 打赏
  • 举报
回复
TO:allright_flash() (
allright_flash 2006-11-03
  • 打赏
  • 举报
回复
<forward name="login" path="/two.jsp" redirect="true" contextRelative="true" />
wingoal 2006-11-03
  • 打赏
  • 举报
回复
TO: allright_flash() ()
formbean我没用到啊.而且它已经能执行到action中了.

to:lqhcss(孤枭) ( )
加了更不行啊.一样的错误啊.只是路径有点了变化.
HTTP Status 404 - /test/test/two.jsp

--------------------------------------------------------------------------------

type Status report

message /test/test/two.jsp

description The requested resource (/test/test/two.jsp) is not available.

lqhcss 2006-11-03
  • 打赏
  • 举报
回复
没找到返回页面吧...
<forward name="login" path="/two.jsp"/>....

<forward name="login" path="/test/two.jsp"/>试试..
allright_flash 2006-11-03
  • 打赏
  • 举报
回复
struts-config-test.xml
有问题吧 formbean??
wingoal 2006-11-03
  • 打赏
  • 举报
回复
------------------struts-config-dealviewer.xml--------------------------------
这个写错了.应该是struts-config-test.xml
wingoal 2006-11-03
  • 打赏
  • 举报
回复
楼上的,可以加我MSN么?
山穷水尽了..
xiaoyetao08 2006-11-03
  • 打赏
  • 举报
回复
仔细对应你的名字啊!!!
访问路径也好好看看
wingoal 2006-11-03
  • 打赏
  • 举报
回复
问题还没有解决啊....SOS.....

81,122

社区成员

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

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