开发者

How do I re-direct all http requests to a mount point

开发者 https://www.devze.com 2023-03-10 11:55 出处:网络
We currently use JBoss 5.1 as the application server and my application is mounted on http://<host>:<port>/<myapp>. Images are rendered via the following mount point

We currently use JBoss 5.1 as the application server and my application is mounted on http://<host>:<port>/<myapp>. Images are rendered via the following mount point

http://<host>:<port>/<myapp>/img?id=<image-id>

Currently the servlet rendering image is present as part of the application, but I have re-factored this code to run on a tomcat server.

How should I re-direct all http requests to http://<host>:<port>/<myapp>/img?id=<image-id> a tomcat instance (e.g. http://<tomcat-host>:<tomcat-port>/img?id=<image-id>)开发者_如何转开发

Where should I put this re-direction rule?

Note:Should I introduce a apache http server in front of jboss server to achieve this? Is there a simpler way to configure this in a dev environment?


One way I have seen these kinds of things handled is to host images and other static resources at the ROOT context level on an Apache web server. In this way you can host multiple web applications at various other context levels on the same server and port and they can all benefit from shared static resources.

Another advantage to this approach is that your Apache web server can help offset some load off of your production environment.

0

精彩评论

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