Tuesday, March 27, 2012

How to serve static files from both IBM HTTP Server and an application in WebSphere Application Server

Saw this Technote in my Twitter river of news earlier : -

Q:

How can I configure IBM HTTP Server (IHS), and the IBM web server Plug-in, and my web application running in WebSphere Application Server (WAS), to serve some of my static files (JPG, GIF, CSS, JS, etc) from the IHS web server, but serve other static files from my web app running in WAS?

A:

If you want to serve any static files (JPG, GIF, CSS, JS, etc) from your web application in WAS, you must use fileServingEnabled="true" in the ibm-web-ext.xmi file. That will cause the plug-in to use a wildcard entry for the context-root of your web application. For example, if the context-root is "myapp", then there will be a URI entry for "/myapp/*" in the plug-in config, and everything starting with "myapp" will be routed to the application in WAS.

Want to know more ? Then you know what to do ….

No comments:

Post a Comment