• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • Carey Brown
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • fred rosenberger
  • salvin francis

Compiling servlets

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
http://www.wickedlysmart.com/HeadFirst/HeadFirstServlets/HeadFirstJavaServlets.html
is there a way to get a soft copy of the code examples at least?

thanks in advace guys,

jamed
[ May 01, 2005: Message edited by: Moh'd Al Jamed ]
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
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....
 
Jamed
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

regards,

Jamed
reply
    Bookmark Topic Watch Topic
  • New Topic