aspose file tools*
The moose likes Tomcat and the fly likes HTTP Status 403 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "HTTP Status 403 " Watch "HTTP Status 403 " New topic
Author

HTTP Status 403

chailin fong
Greenhorn

Joined: Oct 15, 2007
Posts: 10
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: 61010
    
  65

Does the user have the manager role?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
chailin fong
Greenhorn

Joined: Oct 15, 2007
Posts: 10
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
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: 61010
    
  65

There is no user with the role of manager in your user file.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14111
    
  16

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
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
Thanks. It works now.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HTTP Status 403