Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlets communication on different host

 
Narong Chansoi
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 17987
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HttpURLConnection is fine. It's designed for that kind of thing.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic