| Author |
Question about path on Head First JSP and Servlets for SCWCD 1.4, page 81
|
Antonio Rueda Toicent
Greenhorn
Joined: Sep 05, 2008
Posts: 1
|
|
on page 81, Bert writes:
And says that everything til tomcat should be changed based on the user's own directory path. Thing is I never defined common/lib on my structure and I don't quite understand what he's trying to do here, in this chapter a common folder is never created. I'm currently using ubuntu 9 with tomcat 6, what would my path be?
|
 |
Petar Thomas
Ranch Hand
Joined: Oct 11, 2009
Posts: 234
|
|
Hi Antonio,
Welcome to Java Ranch.
Maybe it should be like this:
or this:
You need to write a classpath for javac to 'servlet-api.jar'. It is part of a Tomcats Directory Structure.
|
 |
Frits Walraven
Rancher
Joined: Apr 07, 2010
Posts: 1042
|
|
Hi Antonio,
and I don't quite understand what he's trying to do here
In order to run the BeerSelect example you have to compile the BeerSelect class. The BeerSelect class uses J2EE classes (like HttpServlet) which come with Tomcat and are somewhere in the Tomcat directory structure packaged inside the servlet-api.jar file.
The -classpath points to 3 directories:
current dirclasses dirservlet-api.jar
so in order to compile your BeerSelect class you have to point to the servlet-api.jar on your system.
Regards,
Frits
|
 |
Vijitha Kumara
Bartender
Joined: Mar 24, 2008
Posts: 3670
|
|
Antonio Rueda Toicent wrote:And says that everything til tomcat should be changed based on the user's own directory path. Thing is I never defined common/lib on my structure and I don't quite understand what he's trying to do here,...
It says that after the "tomcat" part it's same, no difference since it is inside the Tomcat home directory. But with Tomcat 6 "lib" directory is directly inside the Tomcat home directory not in the "common" directory. If you are using Tomcat 5 you shouldn't have any problem with the given path.
|
SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
|
 |
 |
|
|
subject: Question about path on Head First JSP and Servlets for SCWCD 1.4, page 81
|
|
|