问题
I have an Eclipse RAP application. The web.xml is the following:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0"
id="WebApp">
<session-config>
<cookie-config>
<http-only>true</http-only>
</cookie-config>
<tracking-mode>COOKIE</tracking-mode>
</session-config>
<servlet id="bridge">
<servlet-name>equinoxbridgeservlet</servlet-name>
<servlet-class>org.eclipse.equinox.servletbridge.BridgeServlet</servlet-class>
<init-param>
<param-name>enableFrameworkControls</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>commandline</param-name>
<param-value>-registryMultiLanguage -ws rap -Dhelp.url.prefix="/foobar" -Dhelp.topic.path="topic" -Dhelp.start.page="index.jsp" -Declipse.product=com.XXXXXXXXXXX -console 7272</param-value>
</init-param>
<init-param>
<param-name>other.info</param-name>
<param-value>org.eclipse.help</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>equinoxbridgeservlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app>
When I start the application, I get the following error in log:
[11/11/13 10:31:39:136 CET] 00000071 webapp W com.ibm.ws.webcontainer.webapp.WebApp initializeStaticFileHandler SRVE0278E: Error while adding servlet mapping --> /*.
I tried this (disable file serving): http://www-01.ibm.com/support/docview.wss?uid=swg1PK18713
Any idea about making it work?
回答1:
Actually the solution really to disable the fileServing. This however did not work for me with the XMI file. I added the following content to the WEB-INF/ibm-web-ext.xml file and then it worked:
<?xml version="1.0" encoding="UTF-8"?>
<web-ext xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://websphere.ibm.com/xml/ns/javaee"
xsi:schemaLocation="http://websphere.ibm.com/xml/ns/javaee http://websphere.ibm.com/xml/ns/javaee/ibm-web-ext_1_0.xsd" version="1.0">
<enable-file-serving value="false"/>
<jsp-attribute name="reloadEnabled" value="true"/>
<jsp-attribute name="reloadInterval" value="10"/>
</web-ext>
The real change is the enable-file-serving tag. This seems to work.
来源:https://stackoverflow.com/questions/19903250/eclipse-rap-2-0-application-wont-start-with-websphere-8-5-5-0