----- Original Message -----
From: "python my" <[EMAIL PROTECTED]>
To: <users@tomcat.apache.org>
Sent: Wednesday, August 27, 2008 12:02 PM
Subject: Multiple authentication within a webapps
Hi there,
I'm running tomcat v5.5.26 in my machine. I would like to add
tomcat-authentication feature into my webapps. I would like to have multiple
user (role) login to different part of the webapps.
The details is like this:
for "user1" (role1), only can access content under "WEB-INF/pages/aaa";
for "user2" (role2), only can access content under "WEB-INF/pages/bbb";
Is that possible for me to user tomcat authentication to achieve my goals?
Thanks for your advices.
- Python -
---------------------------
Python.... google on the key words below like "Tomcat security-constraint"
and you'll learn
Theirs a littlemore to it so you need to read a little...
But the idea is that you stick stuff in the /conf/users file
and then the stuff below wich is in your WEB-INF/web.xml file does all the
rest
It looking at the actual URI and deciding if user got it right... makes the
browser pop up that familiar login etc...
This idea is WRONG "WEB-INF/pages/bbb";
Thats for you config, not really for you web pages... do you web pages
outside of META and WEB-INF... thats generally for stuff like
hiding includes... seldom needed... and browser will not see pages in those
"special" folders.
<security-constraint>
<web-resource-collection>
<web-resource-name>Page Protector</web-resource-name>
<url-pattern>/pages/aaa/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>role1</role-name>
</auth-constraint>
</security-constraint>
Happy googling...
---------------------------------------------------------------------------
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---------------------------------------------------------------------------
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]