• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Not able to start with Tomcat

 
Pradeep Kanwar
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Friends,
I have installed the tomcat on my m/c (Win2000) and set the following variables:
JAVA_HOME= c:\jdk1.2
CATALINA_HOME=c:\progra~1\apache~1.0\bin
CLASSPATH= c:\progra~1\apache~1.0\lib
Now when i try to run the tomcat by double clicking startup.bat file (after going to the bin directory), nothing happens. Only momentary dos window.
I am not able to move ahead. Plz help me.
Also i have javawebserver2.0 installed.
Thanks
pradi
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Open a Dos session, change directory to Tomcats Bin directoy, Type in Startup. See what error you are getting.
 
Pradeep Kanwar
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Carl,
Thanks for your prompt response.
On typing in DOS, it exits (DOS window gets disappeared)
Plz help
pradi
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Something doen't sound right here. The DOS window should not be disappearing. Does it behave like this if you type in other commands? Such as dir or type? or Run exe files such as java or javac?
 
deepak adlakha
Ranch Hand
Posts: 325
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
set tomcat_home=<directory where it's installed like c\d>:\<directory name\bin;
It should work ...
if not and pls let us what's error u r getting.u also have to set some jar file(which r there in lib directory to classpath)
 
David Gu
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

You need to setup the DOS initial enviroment to 4096. (default is auto).
Below is the step.
Right click the shortcut of Startup.bat icon.
Select property
Select the Memory tab
Change the Inital Enviroment from auto to 4096.
By the way, it will be better it you can use the JDK1.3 for tomcat4.0 version.
Hope it helps.
David
SCJP/SCWCD/SCEJA
 
prateek shah
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
try setting java classpath ,
classpath=c:\jdk1.2\bin;c:\jdk1.2\lib;
i think this should help
bye
pratik
 
Tim Duncan
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

You shouldn't need to set TOMCAT_HOME or CLASSPATH. All that Tomcat 4.0 requires is CATALINA_HOME and JAVA_HOME.
And ... there's no point in setting classpath to the jdk/bin dir (no class files there!). I expect that Prateek meant PATH, so that java and javac are accessible, however this is not necessary for Tomcat.

Originally posted by prateek shah:
try setting java classpath ,
classpath=c:\jdk1.2\bin;c:\jdk1.2\lib;

 
Pradeep Kanwar
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Friends,
Thanks for taking so much pain in helping me out.
I realized one of the mistakes in my configuration. The catalina_home should not be till bin directory, but till the parent directory of bin.
Also i have read that, on win2000, long names like program files give problems. Thus i have changed the path to c:\tomcat (which is not the catalina_home).
It has worked but i am getting an error
A nonfatal internal JIT (3.00.078(x)) error 'Relocation error: NULL relocation target' has occurred in :
'org/apache/crimson/parser/Parser2.maybeComment (Z)Z': Interpreting method.
Please report this error in detail to http://java.sun.com/cgi-bin/bugreport.cg
I am not able to understand it. Is there any problem with my JDK?
Thanks once again for the help.
pradi
 
Pradeep Kanwar
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
As i told im able to run tomcat. I am stuck again.
Java webserver used to be soooo simple.
I want to run a simple JSP and servlet. I made the jsp file and put it in \webapps\mydev directory (mydev dir created by me). Now to execute it i typed http://localhost:8080/mydev/Test.jsp (my jsp file).
Do i need to make any change in server.xml. i tried adding context but it didnt work.
Similarly for server, what do i need to do?
It would be great if someone could plz tell me the simple steps for executing jsp and servlet along with java beans on tomcat.
Thanks a lot in advance
pradi
 
Tim Duncan
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you make a jsp subdirectory in your mydev directory, and put the jsp file there, you can access it as:
http://localhost:8080/mydev/jsp/Test.jsp
without any changes to your web.xml

 
deepak adlakha
Ranch Hand
Posts: 325
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
Make sure you have servlet.jar is in your classpath which under lib directory of the tomcat.
and if try access http://localhost:8080/<web-applcation name>/<directory-if any>/<jsp name>
like http://localhost:8080/model/jsp/test.jsp
Thanks n Regards
 
Pradeep Kanwar
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i have set the classpath as well..
still not able to test any jsp.. getting the same old error on running tomcat :
A nonfatal internal JIT (3.00.078(x)) error 'Relocation error: NULL relocation target' has occurred in :
'org/apache/crimson/parser/Parser2.maybeComment (Z)Z': Interpreting method.
Please report this error in detail to http://java.sun.com/cgi-bin/bugreport.cg
Just to tell again i've win2000 OS.
plz help
regards
pradi
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic