0

I have Apache Tomcat 7.0.57 installed on my Windows 7 system. The server is up and running, but whenever I try to run the Manager app, I get an error HTTP Status 404. The description of the error states that the requested resource is not available. I had modified the tomcat-users.xml file to add a user with the role of "manager-gui". Also, during the set up of Tomcat, I set the path variables CATALINA_HOME and CATALINA_BASE as D:/apache-tomcat-7.0.57/ (as I will be running only a single instance of the server). But this still doesn't seem to be OK.

Whenever I start the server using eclipse, this is what the console displays:

Feb 09, 2015 3:19:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version:        Apache Tomcat/7.0.57
Feb 09, 2015 3:19:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built:          Nov 3 2014 08:39:16 UTC
Feb 09, 2015 3:19:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server number:         7.0.57.0
Feb 09, 2015 3:19:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Name:               Windows 7
Feb 09, 2015 3:19:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version:            6.1
Feb 09, 2015 3:19:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture:          amd64
Feb 09, 2015 3:19:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JAVA_HOME:             C:\Program Files\Java\jre7
Feb 09, 2015 3:19:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version:           1.7.0_75-b13
Feb 09, 2015 3:19:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor:            Oracle Corporation
Feb 09, 2015 3:19:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE:              D:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp2
Feb 09, 2015 3:19:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME:         D:\apache-tomcat-7.0.57
Feb 09, 2015 3:19:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument:-Dcatalina.base=D:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp2
Feb 09, 2015 3:19:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.home=D:\apache-tomcat-7.0.57
Feb 09, 2015 3:19:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dwtp.deploy=D:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp2\wtpwebapps
Feb 09, 2015 3:19:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.endorsed.dirs=D:\apache-tomcat-7.0.57\endorsed
Feb 09, 2015 3:19:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dfile.encoding=Cp1252
Feb 09, 2015 3:19:21 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
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:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\;D:\Python\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Ixia\Tcl\8.5.12.0\bin;C:\Program Files (x86)\Ixia\Perl\site\bin;C:\Program Files (x86)\Ixia\Perl\bin;;C:\Program Files\Boot2Docker for Windows;C:\Program Files\Java\jre7\bin\;;.
Feb 09, 2015 3:19:21 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Feb 09, 2015 3:19:21 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8010"]
Feb 09, 2015 3:19:21 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 504 ms
Feb 09, 2015 3:19:21 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Feb 09, 2015 3:19:21 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.57
Feb 09, 2015 3:19:22 PM org.apache.catalina.util.SessionIdGenerator createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [197] milliseconds.
Feb 09, 2015 3:19:22 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Feb 09, 2015 3:19:22 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8010"]
Feb 09, 2015 3:19:22 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 535 ms

The CATALINA_BASE mentioned in this is not what I set.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
aman
  • 121
  • 1
  • 4
  • 12

1 Answers1

0

It is not straight forward when you invoke Tomcat from within Eclipse. Please read the FAQ section at https://wiki.eclipse.org/WTP_Tomcat_FAQ

It explains how if you start Tomcat from within Eclipse, the binaries of original directories of Tomcat are used, but the web apps etc are stored separately.

Srikanth
  • 1,725
  • 2
  • 10
  • 11
  • I understand that. My server is running. However, I have been trying to gain access to the Manager App. That fails. The FAQ section does specify that it will be difficult to open the Manager App, but otherwise no instructions are listed. I need a way to configure Tomcat in Eclipse so that I can run the Manager App. – aman Feb 10 '15 at 07:14
  • Manager app and other apps, which you are used to are in the other installation of Tomcat. Eclipse uses the binaries but creates its own server.xml and web.xml files, which do not have entries for those web apps. You can double click on the server in the console of eclipse and you will see a section "Specify the server path (i.e. catalina.base) and deploy path. Server must be published with no modules present to make changes.", and click on the second option if it is enabled. That will enable you to see the manager app. – Srikanth Feb 10 '15 at 11:50