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...