Re: Filter Problem

2004-11-23 Thread Tim Funk
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Filter Problem

2004-11-23 Thread Jack Lauman
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Filter Problem

2004-11-23 Thread Tim Funk
You probably want to ignore context path. Its servletPath you really care about.
-Tim
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Filter Problem

2004-11-23 Thread Jack Lauman
Tim:
Thanks for your help.  It's fixed.
Jack
Tim Funk wrote:
You probably want to ignore context path. Its servletPath you really 
care about.

-Tim
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: filter problem

2003-11-24 Thread Shapira, Yoav

Howdy,
Perhaps something is messed up in your browser?

I don't like using spaces in servlet or filter names, but that's just me ;)

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: bwasko [mailto:[EMAIL PROTECTED]
Sent: Monday, November 24, 2003 7:29 AM
To: Tomcat Users List
Subject: filter problem

My web.xml fragment:

filter-nameSet Character Encoding/filter-name
filter-classfilters.SetCharacterEncodingFilter/filter-class
init-param
param-nameencoding/param-name
param-valueISO-8859-2/param-value
/init-param
/filter
filter-mapping
filter-nameSet Character Encoding/filter-name
url-pattern/*/url-pattern
/filter-mapping

In fact when I get request.CharacterEncoding I get iso-8859-2 (Central
European) but why my national (polish) chars are wrong encoded??. For the
Strings I post submitting the form
and try to write into console I get something like ?Â???Â?.
What I am doing wrong?

Cheers Bartek






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]