Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configuring tomcat server to forward requests to other web server

I've on WebApp in JBoss server on Port 9944, I need one security layer above this layer, which accepts the request then internally forward(not redirect) the request to that JBoss server without any change in URL at client side, So its like I need Proxy kind of layer above my WebApp layer.

I need this kind of thing for security kind of reason.

So any request comes from browser, it will first hit on that Proxy layer then it will internally forward the request to my Jboss WebApp instance without any change in browser Address Bar.

Any idea how I can proceed?

like image 346
SmartSolution Avatar asked Oct 11 '22 10:10

SmartSolution


1 Answers

If the proxy is in the same web application then you can use RequestDispatcher.forward() in the Servlet API.

If the proxy is in a separate web application then you'll need to open a HTTP connection to the primary application and make the request. There are a bunch of different ways to do this, including Apache HTTPClient, Spring RestTemplate, Jersey Client, etc.

like image 69
sourcedelica Avatar answered Oct 15 '22 11:10

sourcedelica