Author
HTTP Status 403
chailin fong
Greenhorn
Joined: Oct 15, 2007
Posts: 10
posted Oct 15, 2007 08:52:00
0
HTTP Status 403 -- Access to the requested resource has been denied I am new to JSP . I followed the book (Beginning Java Server Page) example to delpoy chapter examples to Tomcat container. When I typed: http://localhost:8080/manager/html, it prompts me to enter user name and password. After entering user name and passwd, I got the above message. When I checked /tomcat/conf/tomcat-users.xml, both user name and password are matched as I typed. How to solve this error? Thanks in advance.
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56185
Does the user have the manager role?
[Smart Questions ] [JSP FAQ ] [Books by Bear ] [Bear's FrontMan ] [About Bear ]
chailin fong
Greenhorn
Joined: Oct 15, 2007
Posts: 10
posted Oct 15, 2007 09:13:00
0
I'm not sure. I used tomcat/tomcat for user name and password. BTW, How to set up manager role? The following is the tomcat-users.xml file: <?xml version="1.0" encoding="utf-8" ?> - <tomcat-users> <role rolename="tomcat" /> <role rolename="role1" /> <role rolename="manager" /> <role rolename="admin" /> <user username="tomcat" password="tomcat" roles="tomcat" /> <user username="role1" password="tomcat" roles="role1" /> <user username="both" password="tomcat" roles="tomcat,role1" /> </tomcat-users>
Michael Ku
Ranch Hand
Joined: Apr 20, 2002
Posts: 510
posted Oct 15, 2007 09:46:00
0
Would you publish the web.xml file? We need to look at how you mapped security in your we app...
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56185
There is no user with the role of manager in your user file.
Jesper de Jong
Java Cowboy
Bartender
Joined: Aug 16, 2005
Posts: 12911
Originally posted by chailin fong: BTW, How to set up manager role?
Add a user with role="manager" to the file and restart Tomcat.
Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Michael Ku
Ranch Hand
Joined: Apr 20, 2002
Posts: 510
posted Oct 15, 2007 14:53:00
0
You can always go to the Tomcat site to find out how to do these things
chailin fong
Greenhorn
Joined: Oct 15, 2007
Posts: 10
posted Oct 16, 2007 08:49:00
0
Thanks. It works now.
subject: HTTP Status 403