tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Todd Kaplinger" <todd_kaplin...@hotmail.com>
Subject Re: Problems with <url-pattern>*
Date Fri, 09 Aug 2002 21:43:36 GMT
define a servlet mapping of just "/". this is the default servlet mapping.  
To get the servlet name use request.getPathInfo(). This will return the info 
after the slash.


>From: Alexander Wallace <tomcater@rwsoft-online.com>
>Reply-To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
>To: Tomcat Users List <tomcat-user@jakarta.apache.org>
>Subject: Problems with <url-pattern>*
>Date: 09 Aug 2002 16:46:07 +0100
>
>
>
>Hi there! New to the list. And to java and tomcat, so please be nice.
>
>I have a problem with a servlet mapping. If i use a url-pattern like
>
><url-pattern>/Hello</url-pattern> on a servlet mapping pointing to a
>particular servlet, the servlet get's the request and i can use
>request.getServletPath() to get the URI.
>
>But if I use something like <url-pattern>/*</url-pattern> or
><url-pattern>*</url-pattern>, and it seems that anyghing with an *, the
>servlet get's called, BUT request.getServletPath() is empty!
>
>What I want is to actually direct all requests to my webapp to a
>particular servlet to validate priviledges (is this the best way to
>ensure that noone without permission accesses any page?)
>
>Thanks in advance for the help!
>
>
>
>--
>To unsubscribe, e-mail:   
><mailto:tomcat-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: 
><mailto:tomcat-user-help@jakarta.apache.org>




-----------------------
Todd Kaplinger
mailTo:kaplinger@alum.bentley.edu

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message