Reputation: 3538
I am trying to set up Tomcat server & trying to run a .war file. I unfortunately am struggling to get it running. My problem is that after starting the server I am able to access the localhost:8080 page but the war file is not getting deployed when I do localhost:8080/Amazon where Amazon.war is my war file that I have kept in my webapps folder.
How to deploy a war file in Tomcat 7
I am following the instructions in the above link. So I tried to use the GUI manager instead. I believe tomcat needs to be configured to GUI. So I tried following the instructions that I got on my web browser.
Error message on browser:
Begin:
You are not authorized to view this page. If you have not changed any configuration files, please examine the file conf/tomcat-users.xml in your installation. That file must contain the credentials to let you use this webapp.
For example, to add the manager-gui role to a user named tomcat with a password of s3cret, add the following to the config file listed above.
END:
However this also does not seem to work. I restarted the server. What wrong am I doing?
Edit :
my tomcat-user.xml files contents are as follows :
<tomcat-users>
<role rolename="manager-gui"/>
<user username="tomcat" password="s3cret" roles="manager-gui"/>
</tomcat-users>
the rest of the contents are comments.
Upvotes: 0
Views: 4090
Reputation: 3538
I finally got it working ! I could not figure out what the problem was . I had to reinstall the Tomcat . This time i selected 32-bit/64-bit Windows Service Installer that specifically installed Tomcat as the service .
Thanks @david !
Upvotes: 0