Hi,

I have the following CXF Servlet configuration:

<!-- CXF Servlet -->
<servlet>
<servlet-name>CXFServlet</servlet-name>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
<!-- Redirect all JSP requests to the default jsp servlet -->
<init-param>
<param-name>redirects-list</param-name>
<param-value>.*\.jsp</param-value>
</init-param>
<init-param>
<param-name>redirect-servlet-name</param-name>
<param-value>jsp</param-value>
</init-param>
<!-- Serve static content -->
<init-param>
<param-name>static-resources-list</param-name>
<param-value>.*\.html .*\.htm .*\.js .*\.css</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>

As you can see my servlet is matching all requests that's why I must handle JSPs and static contact. The above config works like charm on Tomcat. Unfortunately I need my application both on Tomcat and Weblogic. After looking into org.apache.cxf.transport.servlet.AbstractHTTPServlet, I found out that with WbLogic servlet context, there's no request dispatcher for the name JSP. So I tried adding the following servlet to my web.xml:
<servlet>
<servlet-name>jsp</servlet-name>
<servlet-class>weblogic.servlet.JSPServlet</servlet-class>
</servlet>

With this additional config the request is endlessly redirected to the same servlet (weblogic.servlet.JSPServlet) and I end with StackOverflowError which is catched in AbstractHTTPServlet.

So I can mark the following problems:
    1. I can not serve JSPs with redirect, on WebLogic...

2. I can't make the application work on both WL and Tomcat. Even If I can add some servlet config for weblogic (hopefully issue 1 will be solved), then I will need two separate web.xml configs for weblogic and tomcat.

I hope someone will have any ideas how can I proceed.

Regards,
Nikolay

Reply via email to