wood burning stoves 2.0*
The moose likes Tomcat and the fly likes need help with declarative security Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "need help with declarative security" Watch "need help with declarative security" New topic
Author

need help with declarative security

kwame Iwegbue
Ranch Hand

Joined: Sep 02, 2000
Posts: 197
I'm using Eclipse 3.1 and Tomcat 5.5.12 to develop an application, and now i'm trying to get the servlet container to provide the login work. I know the xml is right but for some reason i'm unable to login.

This my install_dir/conf/tomcat-users.xml



Here is relevant section of web.xml



...and finally my login page..



...So why when i try to access the preotected page referrenced by "/preotected", why am I getting this error:

HTTP Status 403 - Access to the requested resource has been denied.

Some pls help....

[ May 29, 2006: Message edited by: kwame Iwegbue ]
[ May 29, 2006: Message edited by: kwame Iwegbue ]

Who dares, wins! (SAS motto)
kwame Iwegbue
Ranch Hand

Joined: Sep 02, 2000
Posts: 197
After hrs of working on this problem, i still have no answer!! But it seems I only get that error message when i enter the correct username/password. With incorrect username/password, i get the login-error page! what does this mean?
kwame Iwegbue
Ranch Hand

Joined: Sep 02, 2000
Posts: 197
I think it's an Eclipse problem. The application works well, if run directly by placing .war in tomcat, but not if launched from Eclipse 5.5 with WTP 1.02 pluggin. Please can anyone help with this?

I know there is an Eclipse forum, but I don't think i should post same question twice.. or should I?
[ May 30, 2006: Message edited by: kwame Iwegbue ]
s ganti
Greenhorn

Joined: Mar 17, 2008
Posts: 2
Hi,
I am facing the same problem. I get this " HTTP 403 - Access to the specified resource (Access to the requested resource has been denied) has been forbidden. ". I am using a dynamic web project in eclipse and have configured my tomcat-users.xml file as shown below -

<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="manager"/>
<role rolename="admin"/>
<user username="techops" password="" roles="admin"/>
<user username="arcampbe" password="" roles="admin"/>
<user username="ranagara" password="" roles="admin"/>
<user username="odechang" password="" roles="admin"/>
<user username="daniobri" password="" roles="admin"/>
<user username="pbasaval" password="" roles="admin"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="tdick" password="" roles="role1"/>
<user username="lsellin" password="" roles="role1"/>
<user username="malwu" password="" roles="role1"/>
<user username="admin" password="admin" roles="admin,manager"/>
</tomcat-users>
I have no clue how I can tackle this error. If you have any ideas, please let me know.
s ganti
Greenhorn

Joined: Mar 17, 2008
Posts: 2
I forgot to mention, I read in some posts that this happens with tomcat 5.5 where the admin 'package' has to be downloaded separately, but I am using tomcat 4.1.37 with eclipse 3.2.2....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: need help with declarative security
 
Similar Threads
redirecting to the last requested page after valid log in
HTTP 403 for authenticated users - FIXED
Doubt on authentication
Sharpen Your Pencil - PN 658
JSF Suggestions Needed