% cd MyProjects/beerV1/
% javac -classpath /Users/bert/Applications2/tomcat/common/lib/
servlet-api:classes:. -d classes src/com/example/web/BeerSelect.java
servlet-api:classes:.
servlet_api.jar
tomcat/common/lib
I looked in my Tomcat directory, and I see a file called:
servlet_api.jar
% cd MyProjects/beerV1/
% javac -classpath /Users/bert/Applications2/tomcat/common/lib/
servlet-api.jar:classes:. -d classes src/com/example/web/BeerSelect.java
servlet-api.jar:classes:.
servlet-api.jar
tomcat/common/lib
As I said, it's all part of one line and is part of the classpath option.
1) Is this command all one line?
or
2) Which compiling option does servlet-api.jar:classes:. belong to?
Since this is a javac/classpath issue and not a servlet particular problem
So you see why it doesn't make sense to ask about just that part. The "servlet-api.jar" is just the end of a long path to that file, and the "classes" part is a separate classpath entry: the book assumes you want your compiled classes to go into a "classes" subdirectory of the current directory.
So, I guess my question boils down to what is in the directories:
a) /tomcat/common/lib/servlet-api.jar
b) classes
c) . (current directory)
that is required to compile the servlet in the example?
So you see why it doesn't make sense to ask about just that part
servlet-api.jar:classes:.
I guess my question boils down to what is in the directories:
a) /tomcat/common/lib/servlet-api.jar
b) classes
c) . (current directory)
that is required to compile the servlet in the example?
As for your not needing to include servlet-api.jar when compiling a servlet: I'm sorry, but you're wrong.
I am trying to find out what the fragment servlet-api.jar:classes:. does. In the past, I've never had to compile a servlet using that
Consider Paul's rocket mass heater. |