tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Funk <>
Subject Re: Filter Problem
Date Tue, 23 Nov 2004 17:00:25 GMT
You probably want to ignore context path. Its servletPath you really care about.


Jack Lauman wrote:

> Can you append the two together to get the desired result?
> Jack
> Tim Funk wrote:
>> getContextPath is the path name of the webapp.
>> For example, if my webapp is registered at /more. Then my contextPath 
>> is /more.
>> If I request /more/cowbell.jsp. The contextPath  is /more and the 
>> servletPath is /cowbell.jsp.
>> -Tim
>> Jack Lauman wrote:
>>> I have an access control filter that is supposed to grant all access 
>>> to users wirh the role of 'admin' and limited access to those with 
>>> the role of  'user.  Specifically a 'user' can only manipulate the 
>>> data that belongs to them.  It uses 'contextPath.startsWith' and the 
>>> users 'id' (int) from the database appended to it to access their 
>>> records.
>>> If I logon as an 'admin' user it works fine.  If I login using a bad 
>>> password it forwards to the notLoggedInPage.  It I login as a 'user' 
>>> with a correct password it forwards to the noAccessPage.
>>> I'm not sure what's wrong here and would appreciate any help in 
>>> resolving this matter,

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

View raw message