1

我有一个 Eclipse RAP 应用程序。web.xml 如下:

<?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>

当我启动应用程序时,我在日志中收到以下错误:

[11/11/13 10:31:39:136 CET] 00000071 webapp W com.ibm.ws.webcontainer.webapp.WebApp initializeStaticFileHandler SRVE0278E: 添加 servlet 映射时出错 --> /*。

我试过这个(禁用文件服务):http ://www-01.ibm.com/support/docview.wss?uid=swg1PK18713

关于让它发挥作用的任何想法?

4

1 回答 1

1

实际上解决方案真的是禁用fileServing。然而,这对我来说不适用于 XMI 文件。我将以下内容添加到 WEB-INF/ibm-web-ext.xml 文件中,然后它起作用了:

<?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>

真正的变化是 enable-file-serving 标签。这似乎有效。

于 2013-11-12T14:18:20.673 回答