|
Problem(Abstract) |
Workaround for problems experienced while disabling the
file serving servlet, SimpleFileServlet. |
|
|
|
Cause |
If file serving is enabled for a Web application, all the
requests from the Web server are routed to the WebSphere® Application
Server that matches the context root of the Web application.
If file serving is disabled, there is a problem with static
includes. To overcome this problem, configure
SimpleFileServlet to serve appropriate file extensions.
|
|
|
Resolving the
problem |
To avoid this problem:
- Change all of the file extensions that you want served by
SimpleFileServlet, to .jspinc (or any other unique
extension).
- If applicable, modify all includes with the file extension
you specified in Step 1.
- Open the EAR or WAR file in the Rational® Application Developer,
WebSphere Studio Application Developer, Application Assembly Tool (AAT),
Application Server Toolkit (ASTK), or a similar tool.
- Verify that file serving is disabled in IBM® Extensions.
- Add the following Web component (Servlet):
For V4:
Component Name: FileServingEnabler
Class Name:
com.ibm.servlet.engine.webapp.SimpleFileServlet
For V5 and V6:
Component Name: FileServingEnabler
Class Name:
com.ibm.ws.webcontainer.servlet.SimpleFileServlet
- Select load on startup.
- Add the following new servlet and URL mapping:
URL Pattern: *.jspinc
Servlet: FileServingEnabler
- Save and deploy the EAR or WAR file.
- Regenerate the plug-in for the changes to take effect.
Now all the static content is served by the Web server, except the
.jspinc files.
|
|
|
|
|
Cross Reference information |
Segment |
Product |
Component |
Platform |
Version |
Edition |
Application Servers |
Runtimes for Java Technology |
Java SDK |
|
|
|
|
|
|