views:

29

answers:

0

Hi,

I am having trouble using urlrewrite with oc4j (10.1.3.1). It works perfectly on tomcat (6.0). I am not able to forward to struts2 actions.

My web.xml:

http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

<display-name>Struts Blank</display-name>

<filter>
    <filter-name>UrlRewriteFilter</filter-name>
    <filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
    <init-param>
        <param-name>logLevel</param-name>
        <param-value>WARN</param-value>
    </init-param>
</filter>
<filter>
    <filter-name>struts2</filter-name>
    <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>


<filter-mapping>
    <filter-name>UrlRewriteFilter</filter-name>
    <url-pattern>/*</url-pattern>       
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>REQUEST</dispatcher>               
</filter-mapping>
<filter-mapping>
    <filter-name>struts2</filter-name>
    <url-pattern>*.action</url-pattern>       
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>REQUEST</dispatcher>    
</filter-mapping>


<servlet>
    <servlet-name>HelloServlet</servlet-name>
    <servlet-class>HelloServlet</servlet-class>
</servlet>
<servlet-mapping>
    <servlet-name>HelloServlet</servlet-name>
    <url-pattern>/hello</url-pattern>
</servlet-mapping>



<welcome-file-list>
    <welcome-file>index.html</welcome-file>
</welcome-file-list>

urlrewrite.xml

<rule>
    <from>/test</from>
    <to>/hello.action</to>
</rule>

Is there any configuration that I need to set on oc4j for it to work?

Debugging the code shows ... HttpServletRequest.getRequestDispatcher("/hello.action") -- does not work on oc4j but works on Tomcat 6.0