【问题标题】:Eclipse Help of RAP 2.0 application does not work with WebSphere 8.5.5.0RAP 2.0 应用程序的 Eclipse 帮助不适用于 WebSphere 8.5.5.0
【发布时间】:2014-01-07 12:56:57
【问题描述】:

问题

据我所知,在 RAP 中,每个 servlet 请求都应该通过 Equinox Servlet Bridge。这包括帮助页面,它们是 org.eclipse.help.webapp 插件中的 JSP 文件。

我在 Web.xml 中有以下 Servlet 映射:

  <servlet-mapping>
    <servlet-name>equinoxbridgeservlet</servlet-name>
    <url-pattern>/*</url-pattern>
  </servlet-mapping>

如果我将应用程序部署到 websphere 中,则无法打开帮助,并且出现以下错误:

看来,WebSphere 只是忽略了我的意愿,我甚至想用 equinox servlet 处理“/index.jsp”url。

已经尝试过

我尝试了 Web 容器的 com.ibm.ws.webcontainer.enableJspMappingOverride 自定义属性,但没有帮助。

documentation 中写道:

当在 jsp-property-group 中定义 url-pattern 时 web.xml,文件,它通常被映射到并由 JavaServer 页面 (JSP) 引擎。如果您的应用程序必须 覆盖此映射,以便他们可以处理和服务 JSP 内容自己,设置 com.ibm.ws.webcontainer.enableJspMappingOverride 属性为 true。

我还在 web xml 中添加了以下 sn-p,但它也没有帮助:

  <jsp-config>
    <jsp-property-group>
        <description>Enables using help webapp JSP pages with Websphere</description>
        <url-pattern>*.jsp</url-pattern>
    </jsp-property-group>
  </jsp-config>

您知道如何让 WebSphere 将我的请求单独保留为 *.jsp URL,并让 Equinox 桥接使其工作吗?

【问题讨论】:

    标签: eclipse jsp websphere equinox eclipse-rap


    【解决方案1】:

    看来,自定义属性是必要的,但还不够。我需要一个额外的 servlet 映射为described here

    所以映射应该是这样的:

      <servlet-mapping>
        <servlet-name>equinoxbridgeservlet</servlet-name>
        <url-pattern>/*</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
        <servlet-name>equinoxbridgeservlet</servlet-name>
        <url-pattern>*.jsp</url-pattern>
      </servlet-mapping>
    

    【讨论】:

    • 如果这个额外的映射解决了这个问题,你介意把这个 sn-p 添加到RAP FAQ吗?
    • 当然不是。随意添加它。还有一个问题,在常见问题解答中很有用:stackoverflow.com/a/19931614/337621
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-04-07
    • 1970-01-01
    • 2015-11-29
    • 2012-02-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多