gpt4 book ai didi

java - 如何修复 OC4J 中的资源未找到错误?

转载 作者:行者123 更新时间:2023-12-01 06:00:20 27 4
gpt4 key购买 nike

我正在尝试在 OC4J 上部署 Web 应用程序,尽管我已严格按照说明进行操作并且部署过程顺利进行,但我仍然收到 500 错误(如下)。我是 OC4J 的新手,所以我希望得到一些关于要查看和修改内容(XML/设置/等)来解决此问题的提示。这是实际的错误,以防万一:

500 Internal Server Error

java.lang.IllegalArgumentException: Resource /login.do not found
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.EvermindPageContext.forward(EvermindPageContext.java:316)
at _index._jspService(_index.java:46)
[SRC:/index.jsp:14]
at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.1.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:453)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:591)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:515)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:711)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)

最佳答案

看起来你的index.jsp重定向到了你的login.do Struts Action;但您的应用程序未配置为将 .do url 重定向到 Struts。 Struts Action Servlet 是否配置为负责所有 *.do url 映射?请在 web.xml 配置文件 (WEB-INF\web.xml) 中查找与此类似的条目:

<servlet>
<servlet-name>action</servlet-name>
<servlet-class>
org.apache.struts.action.ActionServlet
</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>
/WEB-INF/struts-config.xml
</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>

以及到 servlet 的映射,如下所示:

<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>/*.do</url-pattern>
</servlet-mapping>

关于java - 如何修复 OC4J 中的资源未找到错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/722534/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com