File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes requestDispatcher.forward() in OC4J Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "requestDispatcher.forward() in OC4J" Watch "requestDispatcher.forward() in OC4J" New topic
Author

requestDispatcher.forward() in OC4J

dante dantee
Greenhorn

Joined: Jul 15, 2010
Posts: 1
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
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

OC4J has bugs , even i found some when working with that , then we changed from OC4J to weblogic .

Then everything was as expected .


Save India From Corruption - Anna Hazare.
 
 
subject: requestDispatcher.forward() in OC4J