FacuAdmin
asked on
Easy: why can't I even compile servlet HelloWorld?
Hi. I have J2SDK 1.4.0 and Tomcat 4.1 installed. Now, I can compile with "javac" regular programs written in Java, but I cannot compile a thing with servlets!
Tomcat runs normally on http://localhost:8080 and I can run the servlet demo HelloWorld from there. But when I want to compile it on my own I get "javax.servlet doesn't exist" and obviously losts of errors from there on.
I've winXP and my enviroment variables are set:
JAVA_HOME = D:\j2sdk1.4.0_01
CLASSPATH = .
PATH = D:\j2sdk1.4.0_01\bin; SystemRoot%\system32; %SystemRoot%
BASEDIR = D:\j2sdk1.4.0_01\Tomcat 4.1
CATALINA_HOME = D:\j2sdk1.4.0_01\Tomcat 4.1
Thanks a lot
Tomcat runs normally on http://localhost:8080 and I can run the servlet demo HelloWorld from there. But when I want to compile it on my own I get "javax.servlet doesn't exist" and obviously losts of errors from there on.
I've winXP and my enviroment variables are set:
JAVA_HOME = D:\j2sdk1.4.0_01
CLASSPATH = .
PATH = D:\j2sdk1.4.0_01\bin; SystemRoot%\system32; %SystemRoot%
BASEDIR = D:\j2sdk1.4.0_01\Tomcat 4.1
CATALINA_HOME = D:\j2sdk1.4.0_01\Tomcat 4.1
Thanks a lot
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
or install j2ee.
or put servlet.jar inside <jre dir>/lib/ext/ directory
set classpath=c:/Tomcat 4.1/lib/servlet.jar;%class path%;
set class path like this at ur command promt.I am assuming u installed ur tomcat on c drive.
set class path like this at ur command promt.I am assuming u installed ur tomcat on c drive.
ASKER
exactly what I needed.
now, excuse me but I'm new with servlets. I CAN compile now and I get the .class file. I also have a .htm file with <FORM method= get action="HelloWorld" > but that does not work... What do I've to set up? You can save me from reading 30 pages from the Sun page. :)
thanks!
now, excuse me but I'm new with servlets. I CAN compile now and I get the .class file. I also have a .htm file with <FORM method= get action="HelloWorld" > but that does not work... What do I've to set up? You can save me from reading 30 pages from the Sun page. :)
thanks!