• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Trouble restarting Tomcat 6.0.30 with Eclipse

 
Ranch Hand
Posts: 94
Eclipse IDE C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When I start Tomcat 6.0.30 from Eclipse, I can load localhost:8080, but if I stop Tomcat, and restart Tomcat, I cannot load localhost:8080.
 
Rancher
Posts: 618
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why not?
 
Robert Heath
Ranch Hand
Posts: 94
Eclipse IDE C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


You got me! That is what I want to know.

Thanks - Bob
 
Robert Heath
Ranch Hand
Posts: 94
Eclipse IDE C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I can restart Tomcat from the command line, but not from Eclipse.
 
Tom Reilly
Rancher
Posts: 618
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, I was fishing for a reason that may be suggested by an entry in a log file or console output. ItDoesntWorkIsUseless
 
Robert Heath
Ranch Hand
Posts: 94
Eclipse IDE C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am afraid that I don't know enough about Tomcat to give any more info. The Eclipse console does NOT report any errors in the log file. Can you suggest anyways to diagnose this problem?
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
After you restart and hit http://localhost:8080 what do you get on the browser?
 
Robert Heath
Ranch Hand
Posts: 94
Eclipse IDE C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Maneesh Godbole wrote:After you restart and hit http://localhost:8080 what do you get on the browser?



Upon failure the browser displays:

"Oops! This link appears to be broken.

Did you mean: localhost-­8080.­com"

Upon success the browser displays the Tomcat window.
 
Robert Heath
Ranch Hand
Posts: 94
Eclipse IDE C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Looking at the log files, it appears that when I start Tomcat from the command line, there is some activity that occurs that does not occur when I start Tomcat from Eclipse. The Eclipse startup does not display messages indicating:

Deploying web application directory docs
Deploying web application directory examples
Deploying web application directory host-manager
Deploying web application directory manager
Deploying web application directory ROOT

These messages appear when I start Tomcat from the command line but do not appear when starting Tomcat from Eclipse.


 
Tom Reilly
Rancher
Posts: 618
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Eclipse only starts the web apps that it knows about (the ones in its workspace) and only those that you've told it to run. From the Servers view, right click on the server and select Add and Remove. You will see the list of projects configured to run.
 
Robert Heath
Ranch Hand
Posts: 94
Eclipse IDE C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tom Reilly wrote:Eclipse only starts the web apps that it knows about (the ones in its workspace) and only those that you've told it to run. From the Servers view, right click on the server and select Add and Remove. You will see the list of projects configured to run.



Tom,

I am having trouble getting Tomcat to launch correctly from Eclipse. Starting the app comes later.

Thanks - Bob
 
Robert Heath
Ranch Hand
Posts: 94
Eclipse IDE C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When launching Tomcat from the command line, I go to the Tomcat/bin directory and run startup.bat, which works OK.

When launching Tomcat from Eclipse, I believe Eclipse uses bootstrap.jar from the Tomcat/bin directory, which doesn't work OK.
 
Tom Reilly
Rancher
Posts: 618
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you use http://localhost:8080, Tomcat by default runs the web application called ROOT. As I said, Eclipse only deploys the web applications that it knows about and that are configured to start. ROOT is not one of them.
 
Robert Heath
Ranch Hand
Posts: 94
Eclipse IDE C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When launching Tomcat from Eclipse, I get the following log: (This fails )



When launching Tomcat from the command line, I get the following log: (This works )




 
Tom Reilly
Rancher
Posts: 618
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As your logs show, Eclipse is starting Tomcat just fine. When you start Tomcat outside of Eclipse, Tomcat deploys the applications in its webapps directory. This includes the ROOT web application. When you start Tomcat from Eclipse, Eclipse provides to Tomcat a different webapps directory. This webapps directory does not have the ROOT web application. It only has the web applications that have been configured in Eclipse.
 
Robert Heath
Ranch Hand
Posts: 94
Eclipse IDE C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When I select Server>Tomcat>Add and Remove,

the only selections are my Java applications. There is not a "ROOT" app.
 
Tom Reilly
Rancher
Posts: 618
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So we've established that Eclipse starts Tomcat just fine. Eclipse allows you to start Tomcat so it can help you debug your web application. What are you trying to accomplish? Is it to be able to type http://localhost:8080 rather than http://localhost:8080/yourWebApplication/ ?
 
Robert Heath
Ranch Hand
Posts: 94
Eclipse IDE C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, the server seems to be starting OK, when I start the server indirectly by starting the app first. But starting the server first is still not working quite right. I am trying to understand this situation right now. I am trying to go through the various permutations to try to get a handle on it.
 
Robert Heath
Ranch Hand
Posts: 94
Eclipse IDE C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, starting my java app, while the server is stopped, will start the server and the app seemingly fine. However, if I start the server, and then start my java app, the app will not start.

Starting the server directly from the Eclipse server window seems to be still messed up, but I can get around that now. I am probably going to continue to investigate to try to understand why though.

Thanks for your help Tom!
 
Robert Heath
Ranch Hand
Posts: 94
Eclipse IDE C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tom Reilly wrote:So we've established that Eclipse starts Tomcat just fine. Eclipse allows you to start Tomcat so it can help you debug your web application. What are you trying to accomplish? Is it to be able to type http://localhost:8080 rather than http://localhost:8080/yourWebApplication/ ?



When I start the server from the Eclipse server window, I would like the page http://localhost:8080 to resolve.
 
Tom Reilly
Rancher
Posts: 618
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, I've never tried this but if you created an Eclipse project called ROOT I would think that it could be deployed in Eclipse and Tomcat would handle http://localhost:8080.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic