aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Configuration problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Configuration problem" Watch "Configuration problem" New topic
Author

Configuration problem

Dinuka Arsakularatne
Ranch Hand

Joined: Aug 12, 2006
Posts: 198
i went through the tutorial given in http://www.coreservlets.com/Apache-Tomcat-Tutorial/#Download-Tomcat to configure tomcat. but the thing is only the .html files work and the .jsp files dont work. i downloaded the j2ee 1.5 sdk. after downloading it i set the class path to java/jdk. now the tomcat server is running but the javac command is not working. there is this HelloServlet.java file that i got from the site that im trying to compile. but when i do try to compile still it gives errors saying can not find import javax.servlet.*; & import javax.servlet.http.*; . i know these are packages from the j2ee but i did install j2ee. can anyone help me with this?


thank you.


if who i am is what i have, and what i have is lost, then who am i?<br /> <br />SCJP 5.0<br />SCWCD 1.4<br />SCBCD preparing
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

You'll find these jars in Tomcat's common/lib directory.


[My Blog]
All roads lead to JavaRanch
Dinuka Arsakularatne
Ranch Hand

Joined: Aug 12, 2006
Posts: 198
the thing is i have set the classpath to those directories as given in the site i mentioned above. the thing is the problem with the compiler. when i compile it says it can not find the package names i mentioned earlier. i have installed j2ee 1.5. is it a problem with that? it came with something called sun application server. is that the problem? please help as im very new to j2ee technology.

thank you.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

It's not the directory you have to set in the classpath, but the jar files, especially servlet-api.jar.
Dinuka Arsakularatne
Ranch Hand

Joined: Aug 12, 2006
Posts: 198
i have done that. my enviroment variables are set as follows;

CLASSPATH = .;C:\apache-tomcat-5.5.17\apache-tomcat-5.5.17\common\lib\servlet-api.jar;C:\apache-tomcat-5.5.17\apache-tomcat-5.5.17\common\lib\jsp-api.jar;C:\Servlets+JSP
JAVA_HOME = C:\Program Files\Java\jdk1.5.0_02
PATH = "C:\Program Files\Java\jdk1.5.0_02";%PATH%


but still its not working. why is that?
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

You did fine. You're compiling at the command prompt, right ?
On the command prompt, try the following :


dir C:\apache-tomcat-5.5.17\apache-tomcat-5.5.17\common\lib\servlet-api.jar
Dinuka Arsakularatne
Ranch Hand

Joined: Aug 12, 2006
Posts: 198
i did what you told me to do. i got the following result.

C:\>dir C:\apache-tomcat-5.5.17\apache-tomcat-5.5.17\common\lib\servlet-api.jar
Volume in drive C has no label.
Volume Serial Number is B800-EE64

Directory of C:\apache-tomcat-5.5.17\apache-tomcat-5.5.17\common\lib

04/14/2006 02:09 PM 97,703 servlet-api.jar
1 File(s) 97,703 bytes
0 Dir(s) 6,121,197,568 bytes free

what next? its still not working. i have set the class path to the j2se5.0 folder. but i also installed j2ee sdk as well because it didnt work before. do i need to set the class path to the j2ee sdk? if so to which path?
Dinuka Arsakularatne
Ranch Hand

Joined: Aug 12, 2006
Posts: 198
also now its saying that javac is not a recognized command when i type it in the command line.

please help

thank you
Vikrant Pandit
Ranch Hand

Joined: Mar 27, 2006
Posts: 245
Hi Dinuka,

Setting your path to

PATH = "C:\Program Files\Java\jdk1.5.0_02\bin";%PATH%

will resolve the problem of javac being not a recognized commands

HTH


Vikrant Pandit
Dinuka Arsakularatne
Ranch Hand

Joined: Aug 12, 2006
Posts: 198
thanks everyone. it was my mistake. i havent correctly configure the j2ee sdk and the ANT_HOME enviroment variables. thats why it didnt work. now its ok. again i want to thank everyone for helping me.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Configuration problem