Home arrow static arrow Java Programming [Archive] - Running tomcat.
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - Running tomcat.
This topic has 9 replies on 1 page.

Posts:84
Registered: 12/8/03
Running tomcat.  
Jun 17, 2004 8:11 AM



 
Hi All,

When I run the startup.bat file that is on the tomcat/bin folder on my C: drive, opens the cmd line and
close it very fast. So, I cannot start my application. Do you know what could be the problem?
I checked the system and user varialbles: TOMCAT_HOME, classpath, path and everything is fine.
I don't know what is going on?

I appreciate your help.
Pat

 

Posts:6,147
Registered: 11/9/00
Re: Running tomcat.  
Jun 17, 2004 8:14 AM (reply 1 of 9)



 
Get a command window up and run the batch file from there. Then you can see what you're doing.

If you don't have "Command Prompt" on your start menu select "Run.." and type in "cmd".
 

Posts:84
Registered: 12/8/03
Re: Running tomcat.  
Jun 17, 2004 1:38 PM (reply 2 of 9)



 
Hi, thank you for your response.
I'm running c:\tomcat\bin\startup.bat and I get this:

C:\tomcat\bin>startup.bat
Including all jars in C:\tomcat\lib in your CLASSPATH.

Using CLASSPATH: C:\tomcat\classes;C:\tomcat\lib\ant.jar;C:\tomcat\lib\classes12
.zip;C:\tomcat\lib\jasper.jar;C:\tomcat\lib\jaxp.jar;C:\tomcat\lib\parser.jar;C:
\tomcat\lib\servlet.jar;C:\tomcat\lib\webserver.jar;C:\tomcat\lib\xml.jar;c:\jdk
;C:\tomcat\webapps\SIJAVA\WEB-INF\classes;C:\tomcat\webapps\SIJAVA\WEB-INF\prope
rties;c:\jdk\lib\tools.jar

Starting Tomcat in new window
C:\tomcat\bin>
And at the same time opens another cmd window that closes very fast instead of staying open...
so, this means that tomcat is not running...
 

Posts:21,719
Registered: 98-02-20
Re: Running tomcat.  
Jun 17, 2004 1:40 PM (reply 3 of 9)



 
Look in the Tomcat logs. There's an error message there waiting for you, I'll bet.

%
 

Posts:21,719
Registered: 98-02-20
Re: Running tomcat.  
Jun 17, 2004 1:42 PM (reply 4 of 9)



 
I checked the system and user varialbles: TOMCAT_HOME, classpath, path and everything is fine.

CLASSPATH is meaningless here. Tomcat ignores it.

Do you have CATALINA_HOME set? I set CATALINA_HOME, and then have TOMCAT_HOME point to it.

%
 

Posts:3,258
Registered: 00-08-28
Re: Running tomcat.  
Jun 17, 2004 2:36 PM (reply 5 of 9)



 
try connecting to the tomcat thru your web browser. Its a test you would find in tomcat docs. I guess the port would be 8080. see what happens?
 

Posts:21,719
Registered: 98-02-20
Re: Running tomcat.  
Jun 17, 2004 4:02 PM (reply 6 of 9)



 
How did you install Tomcat? Did you unzip a ZIP file, or did you download a .exe and execute it?

If it's the latter, you might already have Tomcat running as a Windoze service. When you start Tomcat with the script, it tries to access port 8080 and finds out that "somebody" already has it - "somebody" being the instance of Tomcat that's running as a service.

%
 

Posts:777
Registered: 9/18/03
Re: Running tomcat.  
Jun 17, 2004 4:39 PM (reply 7 of 9)



 
is your JAVA_HOME variable set to your SDK installation ??
 

Posts:84
Registered: 12/8/03
Re: Running tomcat.  
Jun 22, 2004 11:53 AM (reply 8 of 9)



 
Yes, JAVA_HOME is C:\jdk

and the logs that I get on c:\tomcat\logs are:
jasper.log and
servlet.log

Jasper.log:
2004-06-22 11:45:30 - Scratch dir for the JSP engine is: C:\tomcat\work\localhost_8080%2Fexamples
2004-06-22 11:45:30 - IMPORTANT: Do not modify the generated servlets

servlet.log:
2004-06-22 11:45:30 - path="/examples" :jsp: init
2004-06-22 11:45:30 - path="/SIJAVA" :jsp: init
2004-06-22 11:45:30 - path="/admin" :jsp: init
2004-06-22 11:45:30 - path="" :jsp: init
2004-06-22 11:45:30 - path="/test" :jsp: init

this is the startup.bat file on c:\tomcat\bin:
@echo off
rem $Id: shutdown.bat,v 1.5.4.1 2000/09/04 21:18:05 larryi Exp $
rem Startup batch file for tomcat server.

if not "%TOMCAT_HOME%" == "" goto start

SET TOMCAT_HOME=.
if exist "%TOMCAT_HOME%\bin\tomcat.bat" goto start

SET TOMCAT_HOME=..
if exist "%TOMCAT_HOME%\bin\tomcat.bat" goto start

SET TOMCAT_HOME=
echo Unable to determine the value of TOMCAT_HOME.
goto eof

:start
call "%TOMCAT_HOME%\bin\tomcat" stop %1 %2 %3 %4 %5 %6 %7 %8 %9

:eof


I appreciate your help. Thank you.
 

Posts:84
Registered: 12/8/03
Re: Running tomcat.  
Jun 23, 2004 11:46 AM (reply 9 of 9)



 
This is what I get when I run startup.bat:

Including all jars in C:\tomcat\lib in your CLASSPATH.

Using CLASSPATH: C:\tomcat\classes;C:\tomcat\lib\ant.jar;C:\tomcat\lib\classes12
.zip;C:\tomcat\lib\jasper.jar;C:\tomcat\lib\jaxp.jar;C:\tomcat\lib\parser.jar;C:
\tomcat\lib\servlet.jar;C:\tomcat\lib\webserver.jar;C:\tomcat\lib\xml.jar;c:\jdk
;C:\tomcat\webapps\SIJAVA\WEB-INF\classes;C:\tomcat\webapps\SIJAVA\WEB-INF\prope
rties;c:\jdk\lib\tools.jar

Stop tomcat


Then the cmd window closes. I would like to know why close? before it would stay open...
This would mean that tomcat is running....
 
This topic has 9 replies on 1 page.