开发者

Web Application as Proxy Web-server in Tomcat?

开发者 https://www.devze.com 2023-03-23 09:52 出处:网络
can i write a web-App in Tomcat and set it in deployment to act as a proxy WebApp, meaning it will receive the request f开发者_JS百科rom some web browser for intermediate processing and further forwar

can i write a web-App in Tomcat and set it in deployment to act as a proxy WebApp, meaning it will receive the request f开发者_JS百科rom some web browser for intermediate processing and further forwarding?

thanks


Without claiming that this is the definitive answer: I assume it is not possible.

Usually, you map a path prefix to a web application.

I.e. http://your.site/app will map to a single application.

The web server (tomcat resp. frontent server) will see a GET (e.g.) request for /app (without the host part).

The request line looks like this:

GET /app HTTP/1.1

With a proxy, things are different. The whole URL is submitted to the proxy server and a request line would look like:

GET http://your.site/app HTTP/1.1

I would assume there is not way to handle that with Tomcat, as it is simply not made for that.

There might be an option to use a frontend proxy (apache) and to rewrite URLs before passing them to the app, but that sounds rather odd.

0

精彩评论

暂无评论...
验证码 换一张
取 消