aspose file tools*
The moose likes Servlets and the fly likes Servlets communication on different host Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlets communication on different host" Watch "Servlets communication on different host" New topic
Author

Servlets communication on different host

Narong Chansoi
Greenhorn

Joined: May 21, 2001
Posts: 7
My architecture is
- Browser Tier: for client
- Web server Tier: locate on hosting service provider, run jsp and servlet.
- Application and DB server Tier: locate on my company, run main servlet and EJB.
For web server tier I use jsp and servlet to process layout,
and must communicate to the main servlet and EJB on App & DB tier on my company's server.
I don't want servlet on web server to directly call an EJB on company's server, because of firewall problem. So I need to use servlet on web server call the main servlet on company's server instead.
My problem is how these two servlets on different server to communicate? And how to manage session? I try to use HttpURLConnection for servlet on web server to communicate, but I dno't know there's another way to do like this or not...
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16142
    
  21

HttpURLConnection is fine. It's designed for that kind of thing.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlets communication on different host