Hi, I'm using WAS 4.0 to deploy a WAR file. It installs OK, and the static content (i.e. images) show right. The problem is that I can't get the servlets to run, the browser stops showing a 'File Not Found' error. I think the problem might be related to the 'servlet-mapping'. In my web.xml file I have not defined it. Can anyone tell me if a 'servlet-mapping' element has to be added for each servlet to run in WAS ? If that is the case, is there any way to state that every servlet of a WAR file to have some kind of mapping. (I'd rather not add a 'servlet-mapping' to every servlet inside the WAR file) [I've tried this WAR file on Tomcat and J/Run and it works fine] Thanks, Gustavo Brown
Originally posted by Gustavo Brown: I think the problem might be related to the 'servlet-mapping'. In my web.xml file I have not defined it. Can anyone tell me if a 'servlet-mapping' element has to be added for each servlet to run in WAS ?
Yes, you have to add servlet mappings. Or, enable servlet invoker, so your servlet in WAR file can be exceuted by their class names.
SCJP Java 2 - IBM Certified Enterprise Developer - WebSphere V4.0 & V5.0 - IBM Certified System Administrator - WebSphere Network Deployment V6.0 - Canadian Securities Course (CSC) Certification
posted 18 years ago
And how do I enable servlet invoker ? Do I enable it with some 'web.xml' tags or is it a WebSphere option ? Thanks...
This is a servlet mapping for invoker in ws 3.5 -not sure about ws4. I picked it up from the default_app.webapp in the properties directory. <servlet> <name>invoker</name> <description>Auto-registration servlet</description> <code>com.ibm.servlet.engine.webapp.InvokerServlet</code> <servlet-path>/servlet</servlet-path> <autostart>false</autostart> </servlet> Enjoy.
It's exactly the same and completely different as this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop