• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

servlet communication between two JVMs

 
Javed Sardar
Ranch Hand
Posts: 33
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 672
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you looked into ServletContext.getContext()?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13045
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Vasudha Deepak
Ranch Hand
Posts: 86
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may wish to try making the application distributable in your deployment descriptor:
<web-app>
...
<distributable/>
..
</web-app>

Vasudha
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic