tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Todd Kaplinger" <>
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 <>
>Reply-To: "Tomcat Users List" <>
>To: Tomcat Users List <>
>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:   
>For additional commands, e-mail: 

Todd Kaplinger

MSN Photos is the easiest way to share and print your photos:

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

View raw message