Is it possible to transfer a servlet request from one context to other context If possible can anybody give me the code samples
Regards, Vasantha
Regards,Vasantha<p>Great minds discuss ideas. Average minds discuss events. Small minds discuss people.
Anthony Watson
Ranch Hand
Joined: Sep 25, 2003
Posts: 327
posted
0
You can get a reference to another application's ServletContext like this:
this.getServletContext().getContext(uriPath);
Then, you can save an attribute into that context. Just remember, servlet context attributes are not inherently thread safe!
You could also use the above described method but instead of putting a variable into the servlet context, you put the variable into request context, get a RequestDispatcher from the context you got above, and forward the request to another application.
danny liu
Ranch Hand
Joined: Jan 22, 2004
Posts: 185
posted
0
You must also enbale "Cross Context" accessibility.
Dan
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: Transfer Request from on context to other context