You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ev...@aol.com on 2001/04/11 21:38:48 UTC

Tomcat Problem (startup.bat)

Hello,

I am having a particular problem in getting one of my servlets to work with 
Tomcat. My servlet (and other classes it calls upon to perform processing) is 
located in a directory named: 

c:\tomcat\webapps\nodes\web-inf\classes

When I run c:\tomcat\bin\startup.bat, and try to run the servlet, tomcat 
immediately closes. But, when I run the startup.bat command from the 
directory that the servlet exists in 
(c:\tomcat\webapps\nodes\web-inf\classes\startup.bat), the servlet works 
fine. 

Note: one of the classes reads an input.dat file, which at first I thought 
was causing the problem. The .dat file is in the same directory as the 
servlet. I changed the way I called the .dat file from 

"BufferedReader infile = new BufferedReader(new FileReader("input.dat"));"

to

"BufferedReader infile = new BufferedReader(new 
InputStreamReader(getClass().getResourceAsStream("input.dat")));"

but this did not help the situation. I think it must be a classpath problem; 
this is what my classpath looks like:

CLASSPATH=c:\jdk1.3\jre\lib\rt.jar;c:\j2sdkee1.3\lib\j2ee.jar;c:\tomcat\lib\se

rvlet.jar;c:\tomcat\webapps\nodes\web-inf\classes;c:\tomcat\webapps;c:\tomcat\

webapps\nodes\web-inf;c:\orion\default-web-app\web-inf\classes

Does anyone know what may be causing this problem? I want the servlet to run 
when I launch startup.bat from the c:\tomcat\bin directory, instead of only 
running from when I run startup.bat from the directory the servlet and 
related classes are in.

Thanks,

M. Kaluzienski
www.networks-plus.net