Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am using tomcat5.5 for a long on Ubuntu servers 8.10 and 9.10 and /usr/share/tomcat/webapps/ is the path where I place my .war files and access them on the browser over network.

On a sytem I've installed tomcat6 and I'm failing to find that where do I place my .war file of tomcat6's webapps. I checked deploying war under /var/lib/tomcat6/webapps/ and the war file is extracted and I think this should be the location but I could not access the page when I tried http://serverip:8080/myapp. I could access the default page properly when I navigate to http://serverip:8080. The same war file is working fine on tomcat servers which were not installed from apt repository.

Log Messages:

INFO: Stopping Coyote HTTP/1.1 on http-8080
2 Dec, 2010 10:06:29 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
2 Dec, 2010 10:06:29 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 523 ms
2 Dec, 2010 10:06:29 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
2 Dec, 2010 10:06:29 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.20
2 Dec, 2010 10:06:30 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive myapp.war
2 Dec, 2010 10:06:32 AM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
2 Dec, 2010 10:06:32 AM org.apache.catalina.core.StandardContext start 
SEVERE: Context [/myapp] startup failed due to previous errors
2 Dec, 2010 10:06:32 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
2 Dec, 2010 10:06:32 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3110 ms
2 Dec, 2010 10:06:39 AM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
2 Dec, 2010 10:06:39 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/myapp] startup failed due to previous error

Any help?

share|improve this question
    
On this system is there any other process or Daemon using port 8080? Like Apache, or Tomcat5? netstat -nta | grep LISTEN –  Marco Ceppi Dec 6 '10 at 6:56
    
tcp6 0 0 :::8080 :::* LISTEN. This is listed only one time. –  user3215 Dec 6 '10 at 8:35
    
@user3215 Please edit your question with the additional information, and with the output of sudo /etc/init.d/tomcat6 status Those two combined will help sort if possibly something else is listening on port 8080. –  Marco Ceppi Dec 6 '10 at 8:55
    
/etc/init.d/tomcat6 status * Tomcat servlet engine is running with pid 1931. If any other services is running on 8080 I should not get the default tomcat6 page. I'm thinking what additional info. i can give you. –  user3215 Dec 6 '10 at 9:48
    
I even tried changing the port number to 8088 but the result is same. My work is to just deploy the war under webapps and restart tomcat and it works but not working here for tomcat6. As I'm just a sys. analyst I'm failing to provide you with more info. that what that war file consists of. –  user3215 Dec 6 '10 at 9:58
show 7 more comments

2 Answers

You'll need to use the "manager web-app" to deploy the war file.

  • First: create a manager user for tomcat6. Edit /var/lib/tomcat6/conf/tomcat-users.xml and add something like the following (remember to use a unique password):

    role rolename="admin"

    role rolename="manager"

    user username="admin" password="password" roles="admin,manager"

    (Note: look at the examples in /var/lib/tomcat6/conf/tomcat-users.xml. These lines are tags but I can't post tags on AskUbuntu :( Hopefully, it's not too confusing.)

  • Next: restart tomcat:

    $sudo /etc/init.d/tomcat6 restart

  • Finally, open http://localhost:8080/manager/html and log-in with the username and password that you just set. On the bottom of the page, there's a dialog box that lets you select and deploy a war file.

HTH

share|improve this answer
add comment

Sounds like your servlet context is having some trouble getting started. You might check this link and see if it helps: Debugging Severe Error: listenerStart

share|improve this answer
    
Following the link I could not figure out for myself yet. –  user3215 Dec 6 '10 at 10:06
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.