File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Passing Request Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Passing Request" Watch "Passing Request" New topic

Passing Request

muthulingam Jayakanthan
Ranch Hand

Joined: Feb 27, 2005
Posts: 43

Using HttpSession object is the only way to forwarding request from one servlet to another within two different web application.
Is that right, pelase verify this.
Nathaniel Stoddard
Ranch Hand

Joined: May 29, 2003
Posts: 1258

To do something like this, you 1) need to get the actual context, then 2) get the request dispatcher for that context to include/forward to the resource. Check this out (no guarantees):

Tada! Compile and be dazzled.

muthulingam Jayakanthan
Ranch Hand

Joined: Feb 27, 2005
Posts: 43
Hi nethaniel,
I read one para in the Servlet 2.4 spec saying.

"Context attributes are local to the JVM in which they were created. This prevents ServletContext attributes from being a shared memory store in a distributed container. When information needs to be shared between servlets running in a distributed environment, the information should be placed into a session"

Now I got totally confused. Is this paragraph information about. please help
I agree. Here's the link:
subject: Passing Request
It's not a secret anymore!