You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Michael Duffy <du...@yahoo.com> on 2003/04/23 23:06:42 UTC
Servlet Mapping URL Pattern
I have another fundamental question.
I'm writing an application with a servlet in it. I
package the app into a WAR file and deploy it on
Tomcat using Ant.
There are JSPs in the app that refer to this servlet
in their <form> action.
If the name of my WAR file is app.war, and the
<servlet-name> in the web.xml is appServlet, what
should the URL pattern be in the <servlet-mapping>?
Should it look like:
<servlet-mapping>
<servlet-name>appServlet</servlet-name>
<url-pattern>/app/servlet/appServlet</url-pattern>
</servlet-mapping>
I used /appServlet as my URL pattern, but when I
invoke in from a JSP Tomcat complains that the servlet
is not available. There are no error messages in any
of the log files. I can see that the init parameters
are being found, so the servlet is there. It's when I
call doPost() that there's a problem. Any advice?
__________________________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo
http://search.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org