| Author |
servlet communication between two JVMs
|
Javed Sardar
Ranch Hand
Joined: Sep 10, 2002
Posts: 33
|
|
I have a scenario where I have a servlet running in app servers context and another servlet running in web servers context. I am using iPlanet 6.5 app server and iPLanet 4.1 web server. The problem comes when the servlet in app server invokes the servlet in web server. It works fine but there is no way for user authentication . Any user can directly acces the servlet on web server whith out loggin in which is done through the servlet in app server. Dose any body have idea how to make two serlets communicate if they are running on diif JVMs ? Regards, Javed. I am using two servlets as I have to call CSP(Crystal Server pages and )and these are accessible through web server only.
|
 |
Bruce Jin
Ranch Hand
Joined: Sep 20, 2001
Posts: 666
|
|
|
Have you looked into ServletContext.getContext()?
|
BJ - SCJP and SCWCD
We love Java programming. It is contagious, very cool, and lot of fun. - Peter Coad, Java Design
Crazy Bikes created by m-Power
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12268
|
|
You have described a situation with two separate ServletContexts - Sun explicitly prevents sharing of information between "web applications' - its a security thing. The two JVMs can talk to each other with sockets, Java Message Service, URLConnections, whatever, but you will have to go outside the Servlet API to do it. If the web server servlet only talks to the app server, you could simply have it reject all connections that don't come from the right source. Bill
|
Java Resources at www.wbrogden.com
|
 |
Vasudha Deepak
Ranch Hand
Joined: Mar 15, 2002
Posts: 86
|
|
You may wish to try making the application distributable in your deployment descriptor: <web-app> ... <distributable/> .. </web-app> Vasudha
|
IBM Certified Developer -XML and Related Technologies(141)<br />SCJP2 SCWCD
|
 |
 |
|
|
subject: servlet communication between two JVMs
|
|
|