This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes servlet utilities Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "servlet utilities" Watch "servlet utilities" New topic
Author

servlet utilities

jesse harris
Ranch Hand

Joined: Oct 02, 2000
Posts: 62
I am running jswdk and am trying to use a simple program to auto generate the doctype and title of the html to be generated. But each time i try to compile my servlets the compiler tells me it cannot find my utilities class, but I can see it there and I compileded it before I tried to compile my servlet.
my servlets and the utility prog are in package coreservlets and directory servlets/coreservlets. Do I need to point the compiler to the utility? or restart something? please, any help appreciated.
jesse
Carl Trusiak
Sheriff

Joined: Jun 13, 2000
Posts: 3340
To use a class from a package, The class must exist in a directory structure under the current working directory or under a path in your classpath. In your example, servlets should be the current working directory. The source files would both be in servlets/coreservlets To compile them the command line would be
javac coreservlets/Utility.java
javac coreservlets/YourServlet.java
Hope this helps

I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: servlet utilities
 
Similar Threads
How to use "Coreservlets"
compilation problem
compiling with packages
A question about Servlet and JSP books
Servlet not refreshing