Hi Santosh,
This question is not realy stupid. You can dispatch the request to another resource in another context, but I think there are limitations. I have not tested but there is a method in the ServletContext interface named getContext, which takes the
String argument uri path of the another context. It returns a ServletContext object that corresponds to a specified URL on the server.
Once you get ServletContext of another application, you can call its requestDispatcher method.
Read the following quotes from the API document about this method.
This method allows servlets to gain access to the context for various parts of the server, and as needed obtain RequestDispatcher objects from the context. The given path must be begin with "/", is interpreted relative to the server's document root and is matched against the context roots of other web applications hosted on this container.
In a security conscious environment, the servlet container may return null for a given URL.
Hope this help ypu.
Thanks
Narendra Dhande
SCJP 1.4,SCWCD 1.4, SCBCD 5.0, SCDJWS 5.0, SCEA 5.0