File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes Tomcat starting from command prompt but not from eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Tomcat starting from command prompt but not from eclipse" Watch "Tomcat starting from command prompt but not from eclipse" New topic
Author

Tomcat starting from command prompt but not from eclipse

Dwarka Damodaran
Greenhorn

Joined: Nov 10, 2011
Posts: 7
Hello All,

I ran into an issue as the subject says with apache-tomcat-6.0.33 zip archive installation.

When i run the tomcat server from command prompt it starts up perfectly correct i.e. i am able to access the admin console shipped with tomcat @ http://localhost:8080/. On the other hand i configured the same installation of tomcat with Eclipse Helios Service Release 1 and started the server and was able to see following log

Nov 10, 2011 2:28:04 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre7\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jre7/bin/client;C:/Program Files/Java/jre7/bin;C:/Program Files/Java/jre7/lib/i386;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\PROGRA~1\DISKEE~1\DISKEE~1\;C:\WINDOWS\Support\;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\10.0\DLLShared\;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program Files\Common Files\Autodesk Shared\;C:\Program Files\QuickTime\QTSystem\;C:\develop\environment;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\PROGRA~1\DISKEE~1\DISKEE~1\;C:\WINDOWS\Support\;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\10.0\DLLShared\;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program Files\Common Files\Autodesk Shared\;C:\Program Files\QuickTime\QTSystem\;.
Nov 10, 2011 2:28:04 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Nov 10, 2011 2:28:04 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 323 ms
Nov 10, 2011 2:28:04 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Nov 10, 2011 2:28:04 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.33
Nov 10, 2011 2:28:04 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Nov 10, 2011 2:28:04 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Nov 10, 2011 2:28:04 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/16 config=null
Nov 10, 2011 2:28:04 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 176 ms

meaning the server started @localhost:8080, but i was not able to access the admin console as before with the command line. There were no error in the trace or any abnormal activity on the log. i looked into the TCPView and the port 8080 had the established status. The following are my environment details,

OS - Windows XP Professional (Service pack 3)
Eclipse: Helios Service Release 1 (Build 20100917-0705)
Tomcat: 6.0.33
Java: jdk1.6.0_14

Thanks and Regards,
Dwarka
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5811
    
    7

When Eclipse fires up Tomcat I don't that that it uses the tomcat_home/websapps directory. Thus none of those apps will be available. Only apps that you publish to Tomcat within Eclipse will be available.


JBoss In Action
Dwarka Damodaran
Greenhorn

Joined: Nov 10, 2011
Posts: 7
Hello Peter,

Ya as you said i had not deployed anything onto the tomcat and it was a fresh install. So i created a simple dynamic web project with an index.html and tried accessing it but it still failed with a HTTP Status 404 error. As you had mentioned about the tomcat deploy directory i did check the Server Overview page and found that under Server Locations composite "Use Workspace metadata" was checked. I changed it to "Use Tomcat Installation" and everything worked fine. But why was it not working when "Use Workspace metadata" was checked (Atleast the project that i deployed should have been accessible).

I will anyways try to find out why this happened and keep this post updated.

Thank you very much for your help !!!

Thanks and Regards,
Dwarka
 
wood burning stoves
 
subject: Tomcat starting from command prompt but not from eclipse
 
Similar Threads
Struts Action Question
jsp
trayicon
Problem Deploying a Struts Application in Eclipse
Wrong version appearing for "java" command