wood burning stoves
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 Building Microservices this week in the Design 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: 17046
    
  26

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


An IDE is no substitute for an Intelligent Developer.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlets communication on different host
 
It's not a secret anymore!