私はstruts2バージョン2.3.1.2を使用しているプロジェクトの動的Webを持っています。 このプロジェクトをWebSphereにデプロイします。しかし、私は問題があります:WebSphere上でStruts2を使用して動的Web JSPをデプロイ
[ERROR ] SRVE0293E: [Servlet Error]-[null]: com.ibm.ws.webcontainer.webapp.WebAppErrorReport:
これは私のファイルweb.xml
です。
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:javaee="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" id="WebApp_9"
version="2.4">
<display-name>Struts2 Application</display-name>
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>Login.jsp</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>LoginAction</servlet-name>
<servlet-class>net.viralpatel.struts2.action.LaunchServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
</web-app>
これはこれは、ファイルstruts.xml
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<constant name="struts.enable.DynamicMethodInvocation"
value="false" />
<constant name="struts.devMode" value="false" />
<constant name="struts.custom.i18n.resources"
value="ApplicationResources" />
<package name="default" extends="struts-default" namespace="/">
<action name="login"
class="net.viralpatel.struts2.action.LoginAction">
<result name="success">Welcome.jsp</result>
<result name="error">Login.jsp</result>
</action>
</package>
</struts>
あるクラスLaunchServlet
public class LaunchServlet extends HttpServlet implements Servlet {
public LaunchServlet() {
super();
}
public void init(ServletConfig arg0) throws ServletException {
// this works around a bug in the websphere classloader.
super.init(arg0);
Dispatcher d = new Dispatcher(getServletContext(), new HashMap<String,
String>());
}
}
である私はそれを修正する方法がわかりません。
古くなったサイトをフォローしないでください。公式の文書を見てください。 –