Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

HttpServletRequestWrapper not passing through requestDispatcher.include

843841Jun 24 2005 — edited Jun 24 2005
WindowsXP Pro sp2
WSAD 5.0
Using WAS-Test Environment server
JDK 1.4.1_03

Goal:

From within my servlet's doPost method I want to include the content of a Struts page to be properly formatted into the original request.

Prerequisite:

The user must be able to request a Struts page normally with out a filter in the way and still be able to use the feature mentioned above.

Problem:

When I use the requestDispatcher.include method I am passing a HttpServletRequestWrapper and a HttpServletResponseWrapper. The following test result shows me that the request is being replaced with a container implemented class and the response is being passed straight through.

String reqName = request.getClass().getName();
String resName = response.getClass().getName();
out.write(reqName + ": ");
out.write(resName + ": ");

Output:

com.ibm.ws.webcontainer.srt.SRTServletRequest:
org.xoscript.server.HttpMetaResponseWraper (my implementation).

Question:

Is there any way to get the include method to pass along my version of the request?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 22 2005
Added on Jun 24 2005
1 comment
238 views