Hello.
I am currently studying for the SCWCD 1.4 exam using the Head First book on
Servlets and JSPs. I'm in the 3rd chapter where you develop and depoly a small MVC webapp (about beer).
I've got the J2SE 5 SDK update 4 and
Tomcat 5.5.
Here's what I entered into my Cygwin bash shell on Windows XP (adapted from pg. 85 in the HF book):
Here's the top two errors I got:
What I figured was going on in the javac command was this: look in the normal place where you'd find classes (i.e. J2SE 5.0 API) and also look in the specified location (the Tomcat JAR). I guess neither of those locations have javax.servlet.
I checked the J2SE 5.0 API docs and javax.servlet isn't there. I'm not exactly sure how to see what's inside tomcat's JAR file.
I checked the
J2EE 1.4 API docs and saw that it does have javax.servlet. So, I downloaded the Sun
Java System Application Server Platform Edition 8.1 2005Q2 UR2 which includes the J2EE 1.4 API.
I opened a new shell after installing the J2EE stuff and it gave the same problem. Where is javax.servlet? Where does javac look without any classpath arguments? How do I change that? How do I find what packages are contained in which JAR files?
Is something the matter because I'm using Cygwin? I haven't been able to set any environment variables in Cygwin using the set command. Here's what I typed in:
This didn't create (or modify once created through Windows XP) the CLASSPATH variable. The set manpage is pretty complicated - did I do it correctly?
Should I just use the cmd prompt in Windows?
Answers to any of my 37 questions would be greatly appreciated.
Thanks very much.
Bye bye,
Gaurav Bhatnagar