This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Servlets and the fly likes HeadFirst Servlets & JSP importing a package Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "HeadFirst Servlets & JSP importing a package" Watch "HeadFirst Servlets & JSP importing a package" New topic
Author

HeadFirst Servlets & JSP importing a package

Michael Carlson
Ranch Hand

Joined: Sep 11, 2005
Posts: 78
I'm working on page 85, trying to compile the servlet version 2, but using thier compiler command it can not find the com.example.model package. I've tried setting the classpath variable but have had no luck.
Thanks
Alec Lee
Ranch Hand

Joined: Jan 28, 2004
Posts: 569
This is more a problem related to your classpath setting than servlet. Note the example probably executed in unix where : is class path separator. Windows is using ;.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

This should help:
http://faq.javaranch.com/view?HowToSetTheClasspath


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Michael Carlson
Ranch Hand

Joined: Sep 11, 2005
Posts: 78
Thanks guys.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: HeadFirst Servlets & JSP importing a package