[EMAIL PROTECTED] wrote:
Rick,

It sounds like you are having a problem that I solved last week.

Actually, I'm not the one having the problem. I was just replying to the initial post, that I'd use the Session for stuff that needs to accessed across multiple requests.

I had a situation where I needed to include the result of other actions in the
middle of my ActionClass so I implement HttpServletRequestWrapper and
HttpServletResponseWrapper so that I could provide RequestDispatcher with a
place to store and retrieve variables from the request scope. In my action
class I swapped the real request and response for the wrapped ones and copied
all the request.getParmeters() and so on into a Hashtable in my wrapper
classes. When I called dispatch.include(req,res) the new action.do was able to
function as if I forwarded control to the new action class. In order to
retrieve the output buffer coming back I created one in my response wrapper
using a String buffer so that I could get at with the toString method.

No offense, but that sounds like a case where trying to be creative just made things way more complicated than they need to be. If you need something in other Action classes across multiple requests why not just stuff some object into the Session instead of going through all these hoops? Why in the world would you need to create wrapper classes and push the storage of these objects up into the RequestDispatcher? What does this gain you versus just storing some object in the Session?

--
Rick


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to