Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Tomcat set up  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working with Ubuntu 10.04 server via command line, and have installed JDK and TomCat 6. I can see Tomcat's It Works page when i go to port 8080. i can't access the Manage/html page, since i am not being authenticated with username and password.

I noticed that under /etc/tomcat6/i have tomcat-users.xml. All of the users where commetned out in that file, so i uncommented them, added a role of manager, and a user for that manager role. Still though, unable to get to manager/html.

I looked in server.xml, also in the same directory (/etc/tomcat6) in server.xml there is a reference to tomcat-users.xml. This reference occurs within the GlobalResourse->Resources node, name "UserDatabase". In the Resources node, the pathname = ="conf/tomcat-users.xml" .

My question is, should this "conf" directory be located off from the Catalina directory ? I added a conf/tomcat-users.xml file to the same directory servers.xml is in, (/etc/tomcat6), but am still not able to get into Managers/html.

Anybody think they know the problem ?

Snippet from server.xml "
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>

Here is the xml from /etc/tomcat6/conf/tomcat-users.xml :


<tomcat-users>
<role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="manager"/>
<user username="tomcatManager" password="*****" roles="manager"/>
<user username="tomcat" password="*****" roles="tomcat"/>
<user username="both" password="****" roles="tomcat,role1"/>
<user username="role1" password="*****" roles="role1"/>

</tomcat-users>














[ Read 27 lines ]
^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C Cur Pos
^X Exit ^J Justify ^W Where Is ^V Next Page ^U UnCut Text ^T To Spell


 
Ranch Hand
Posts: 433
Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would suggest that you try to install tomcat manually. I encountered several problems with tomcat-installations from the ubuntu-repositories.
Beside that: have you restart tomcat after adding your new user?
 
Michael R Parker
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have restarted tomcat. Do you know where i can get good instructions for removing the currently loaded tomcat6/ tomcat admin, etc and for loading by hand ?



Joachim Rohde wrote:I would suggest that you try to install tomcat manually. I encountered several problems with tomcat-installations from the ubuntu-repositories.
Beside that: have you restart tomcat after adding your new user?

 
Joachim Rohde
Ranch Hand
Posts: 433
Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Installing is quite straight forward: http://www.howtogeek.com/howto/linux/installing-tomcat-6-on-ubuntu/
For de-installing just use your package manager (e.g. synaptic or whatever you are using). I can't tell you any details from the top of my head for de-installing tomcat via console (and before I tell you anything wrong, I'm better not saying anything at all.)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!