posted 20 years ago
hi ben souther,
yeah i've seen ur reply.the path which i gave for compilation i,e:
C:\Program Files\Apache Group\Tomcat 4.1\webapps\shashiservlets\WEB-INF\classes>javac helloservlet.java
is a correct one.there's no error in that.coz i've set my path to c:\j2sdk1.4.1\bin.
And the path {C:\Program Files\Apache Group\Tomcat 4.1\webapps\shashiservlets\WEB-INF\classes>javac helloservlet.java}
is like i've put my helloservlet program(that is .java file) in classes folder,which is WEB-INF folder,which is in shashiservlets folder,which is in webapps folder,which is in tomcat 4.1 folder,which is in apache group folder,which is in my program files.
as i am new to servlets i was taught to put my .java file in there.the folders shashiservlets,WEB-INF and classes are all created by me.and the webapps folder is provided by tomcat server itself.
actually:
while tomcat installation:the path it has taken is(by default)
C:\Program Files\Apache Software Foundation\Tomcat 5.0\bin
the path of jvm installed on my system is
C:\Program Files\JavaSoft\JRE\1.2
when i open the server by clicking, startup.bat
in
c:\prgram files\apache software foundation\tomcat 5.0\bin
the error i am facing is:
The catalina_home environment variable is not defined correctly
This environment variable is needed to run this program
so i had to install the server to a folder in C drive& the name of it is tomcat5.0
i created a cpath.bat in C:\Tomcat5.0\bin.
The file(cpath.bat) contains
set CATALINA_HOME=C:\Tomcat5.0
set classpath=C:\ProgramFiles\Java\j2re1.4.1\lib;D:\%CATALINA_HOME%\common\lib\servlet-api.jar;d:\%
and in the command window i did.......
C:\Tomcat5.0\bin>cpath
i was shown:
C:\Tomcat5.0\bin>set CATALINA_HOME=C:\Tomcat5.0
C:\Tomcat5.0\bin>set classpath=C:\ProgramFiles\Java\j2re1.4.1\lib;D:\C:\Tomcat5.0\common\lib\servlet-api.jar;d:\
C:\Tomcat5.0\bin>
to start the server i did:
C:\Tomcat5.0\bin>startup
then the error i am facing was:
The JAVA_HOME environment variable is not defined
This environment variable is needed to run this program
Invalid switch
Using CATALINA_BASE: C:\Tomcat5.0
Using CATALINA_HOME: C:\Tomcat5.0
Using CATALINA_TMPDIR: C:\Tomcat5.0\temp
Using JAVA_HOME:
Invalid switch - -DJAVA.ENDORSED.DIRS=
i thought there cod be some installation problem so i reinstalledtomcat5.0 C drive and also i've installed j2sdk1.4.1 also in c drive. and i've copied the cpath.bat file to tomcat5.0/bin in c drive,which contains
set CATALINA_HOME=C:\Tomcat5.0
set classpath=C:\j2sdk1.4.1\jre\lib;D:\%CATALINA_HOME%\common\lib\servlet-api.jar;d:\%
and in the command window i performed:
C:\Tomcat5.0>cd bin
C:\Tomcat5.0\bin>cpath
and it has shown
C:\Tomcat5.0\bin>set CATALINA_HOME=C:\Tomcat5.0
C:\Tomcat5.0\bin>set classpath=C:\j2sdk1.4.1\jre\lib;D:\%CATALINA_HOME%\common\lib\servlet-api.jar;d:\%
C:\Tomcat5.0\bin>
and then i started
C:\Tomcat5.0\bin>startup
and i got this error
Out of environment space
Cannot find
This file is needed to run this program
sir,if there are any errors in these steps performed by me.....then plzzzzz reply so that i could install the apache tomcat server at the earliest.
waiting for a reply