This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
I am using struts 1.2 with OC4j container. For printing purpose i need to get the content of a jsp file generated from a struts action in a normal java class. For that i am passing the request and response object to the generate method in the java class. I hope that by overriding the getWriter() method we can achieve the functionality.
But although the action is processed, the content is always empty. Please advice
In the filter pattern whenever a servlet with a particular url pattern is accessed, it can process the content of the resultant jsp.
Is there any other way we can invoke a servlet from a struts 1 action without using the requestDispatcher object as it includes the wrapped response also with the final result?
I've what you are trying to do with HttpServletResponseWrapper, though the example I have handy has a bunch of other requirements that obfuscate the solution. One difference I see is that I used RequestDispatcher.forward rather than include.