Meaning of url-pattern /xxxx/* .... ???

2002-02-28 Thread Thomas Stiller

What does that (only wildcard-part interesting: * !!!) inside a servlet-mapping mean:

url-pattern //* /url-pattern

Does that mean search in this subdirectory tree
or does it mean search the name corresponding
servlet or what ?

Thx for answerĂ­ng this beginner question
Thomas

-- 

___
Sign-up for your own FREE Personalized E-mail at Email.com
http://www.email.com/?sr=signup



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Meaning of url-pattern /xxxx/* .... ???

2002-02-28 Thread Craig R. McClanahan



On Thu, 28 Feb 2002, Thomas Stiller wrote:

 Date: Thu, 28 Feb 2002 16:57:32 -0500
 From: Thomas Stiller [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Meaning of url-pattern //*  ???

 What does that (only wildcard-part interesting: * !!!) inside a servlet-mapping 
mean:

 url-pattern //* /url-pattern

 Does that mean search in this subdirectory tree
 or does it mean search the name corresponding
 servlet or what ?

 Thx for answerĂ­ng this beginner question
 Thomas


No, it means that your servlet will match the / part, and anything
else will be returned to use as extra path info.

For example, assume you have the above mapping in a webapp mapped to
context path /myapp.  Now, a URL like this:

  http://localhost:8080/myapp//foo/bar.html

will call your servlet, which can then get the following:

  request.getContextPath() will return /myapp
  request.getServletPath() will return /
  request.getPathInfo() will return /foo/bar.html

Using extra path info is a common way to pass parameters to a servlet as
part of the request URL itself.  In addition, it totally hides the fact
that there is no static resource named //foo/bar.html in your app,
so the client has no way to know whether this response is being produced
dynamically or statically.

See the Servlet Specification for what everything in the web.xml file
means:

  http://java.sun.com/products/servlet/download.html

Craig



 --

 ___
 Sign-up for your own FREE Personalized E-mail at Email.com
 http://www.email.com/?sr=signup



 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Meaning of url-pattern /xxxx/* .... ???

2002-02-28 Thread Christopher K . St . John

Thomas Stiller wrote:
 
 What does that (only wildcard-part interesting: * !!!)
 inside a servlet-mapping mean:
 
 url-pattern //* /url-pattern
 

 SRV.11.2 Specification of Mappings, from version 2.3 of the
servlet spec, should have all the information you need. The
servlet spec isn't (for the most part) written in spec-speak, so
it's easy to read. You can download it at:

 http://java.sun.com/products/servlet/download.html

 
-- 
Christopher St. John [EMAIL PROTECTED]
DistribuTopia http://www.distributopia.com

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]