tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <>
Subject RE: Servlet Mapping URL Pattern
Date Thu, 24 Apr 2003 12:37:59 GMT


>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>?

Whatever you want it to be ;)  That's the fun part of url-pattern
mapping.  Of course, your JSPs need to know what this mapping is.


Probably not.  url-pattern is relative to the context root, so don't add
/app at the beginning.  Personally, I also don't like to let the user
agent know they're dealing with a servlet unless I have to, so omit the
/servlet portion and/or use Page instead.

Resulting in:

JSPs that are at your docBase would then have form action="./appPage".
JSPs that are a level down, e.g. at docBase/dir1 would have form
action="../appPage".  Or everything can have 
form action=getContextPath() + "/appPage"

>is not available.  There are no error messages in any
>of the log files.  I can see that the init parameters

Enable the AccessLogValve.  Look at it to see exactly what URL was
requested by the client.

Yoav Shapira
Millennium ChemInformatics

This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message