wood burning stoves
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Compiling servlets 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 "Compiling servlets" Watch "Compiling servlets" New topic

Compiling servlets

Ranch Hand

Joined: Apr 17, 2005
Posts: 35
Hallo everyone,

I've just started reading the HFS book.

I am right into the first appliction of the 1st chapter ( page 30 $ 31)

i can't complie the serlet

in step 5 what should be "/your path/" ?

i don't know what to put in your path. i tried everything possible but still it didn't work

this is the location of tomcat on my machine

E:\Program Files\Apache Software Foundation\Tomcat 5.5

1.what should i put in there?

2.They claim that they have all code examples on this page. this is not true
is there a way to get a soft copy of the code examples at least?

thanks in advace guys,

[ May 01, 2005: Message edited by: Moh'd Al Jamed ]
saiprasad raut
Ranch Hand

Joined: Aug 29, 2003
Posts: 40
I have also faced the same problem. In that case i copied the servlet-api.jar file in my c:\ root folder and then complied the servlet as

javac -classpath c:\servlet-api.jar Servlet.java

Just try this out....
Ranch Hand

Joined: Apr 17, 2005
Posts: 35
I figured it out

D:\project1>javac -classpath "E:\Program Files\Apache Software Foundation\Tomcat 5.5\lib\servlet-api.jar" -d classes src\Ch1Servlet.java

the trick here with the spaces in the path ! windows can't recongnize spaces ! that's why you need to use double qoutes around the path


I agree. Here's the link: http://aspose.com/file-tools
subject: Compiling servlets
It's not a secret anymore!