If your webapp is GenDBconn, then your mapping should be:
<servlet-mapping>
<servlet-name>Controller</servlet-name>
<url-pattern>/servlet/Controller</url-pattern>
</servlet-mapping>Servlet mappings are relative to the webapp root, not the web browser root.
Also, comment out the invoker servlet since you are already mapping your servlet to the one single URL. (And /serlvet/* is very bad)
-Tim
Giulia Hill wrote:
I'm upgrading tomcat to 4.1 from 3.2 and I'm running into a problem with the web.xml
After following a suggestion of commenting out the invoker section in the conf/web.xml of tomcat, I still receive an error when invoking the servlet, even though, alas, a different one.
the servelet in called as 'servlet/Controller' and 'Controller' from forms whose url is of the kind http://domain/GenDBconn
here is my web.xml <web-app> <display-name>GenDBconn</display-name> <description>Test site for GenDB</description> <servlet> <servlet-name>Controller</servlet-name> <description>Test site for GenDB</description>
<servlet-class>edu.berkeley.library.GenDBServlets.GenDBController</servlet-class> <init-param> <param-name>allProjectsXML</param-name>
<param-value>/data/_n/GenDBconn/WEB-INF/classes/edu/berkeley/library/propertyFiles/allProjects.xml</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>Controller</servlet-name> <url-pattern>/GenDBConn/servlet/Controller</url-pattern> </servlet-mapping> <session-config> <session-timeout>30</session-timeout> </session-config> <welcome-file-list> <welcome-file>index.html</welcome-file> </welcome-file-list> </web-app> --------------------------------------------------------------- the web.xml of tomat has the following uncommented <!-- The mapping for the invoker servlet -->
<servlet-mapping> <servlet-name>invoker</servlet-name> <url-pattern>/servlet/*</url-pattern> </servlet-mapping> --------------------------------------------------------------- the error that I see from the logs is: 2003-03-10 15:32:47 StandardContext[/GenDBconn]: Mapping contextPath='/GenDBconn' with requestURI='/GenDBconn/serv let/Controller' and relativeURI='/servlet/Controller' 2003-03-10 15:32:47 StandardContext[/GenDBconn]: Trying exact match 2003-03-10 15:32:47 StandardContext[/GenDBconn]: Trying prefix match 2003-03-10 15:32:47 StandardContext[/GenDBconn]: Mapped to servlet 'invoker' with servlet path '/servlet' and pat h info '/Controller' and update=true 2003-03-10 15:32:47 invoker: included='false', requestURI='/GenDBconn/servlet/Controller' 2003-03-10 15:32:47 invoker: servletPath='/servlet', pathInfo='/Controller' 2003-03-10 15:32:47 invoker: Processing servlet 'Controller' with path info '' 2003-03-10 15:32:47 invoker: Using wrapper for servlet 'Controller' with mapping '/servlet/Controller/*' 2003-03-10 15:32:47 StandardWrapper[/GenDBconn:Controller]: Marking servlet Controller as unavailable 2003-03-10 15:32:47 invoker: Cannot allocate servlet instance for path /GenDBconn/servlet/Controller
--------------------------------------------------------------------------- I have tried a number of different combinations in the servlet-mapping in order to find the servlet but, clearly I haven't got the right one.
Suggestions appreciated!
thanks
Giulia
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
