特急,急两整天了,struts中的Error 404或Error 500问题,恳请高手指教!!!

dupontwh 2003-10-17 04:36:33
我在用struts时,遇到这种问题:

在weblogic的安装目录的DefaultWebApp目录下,有一个main.jsp文件,另外在DefaultWebApp/plan目录下有一个plan_all.jsp。
在jbuilder中,我把左边窗口的<Default Web App>目录下的Root directory的值设为weblogic的安装目录的DefaultWebApp目录,
然后,我想
(1)从main.jsp进入action,再转入plan_all.jsp,
在action中我用了return actionMapping.findForward("month_plan_all");
在struts-config.xml中我定义了<forward name="month_plan_all" path="/plan/plan_all.jsp" />,
但是,转入plan_all.jsp的结果却是
Error 404--Not Found
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.4.5 404 Not Found
The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.

If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address.

或者是Error 500--Internal Server Error
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.5.1 500 Internal Server Error
The server encountered an unexpected condition which prevented it from fulfilling the request.


(2)从main.jsp直接转入plan_all.jsp,
如在main.jsp中是用<a href ="/plan/plan_all.jsp">正确呢?(即映射到weblogic的安装目录的DefaultWebApp目录)
还是用<a href ="./plan/plan_all.jsp">正确呢?(即用相对目录)
...全文
33 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
yao_xh 2003-10-18
  • 打赏
  • 举报
回复
可能是配置的一些问题,你再细看看。
建议用:<a href ="/plan/plan_all.jsp">

67,512

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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