The moose likes Servlets and the fly likes servlet packages problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "servlet packages problem" Watch "servlet packages problem" New topic

servlet packages problem

rudolf hitler
Ranch Hand

Joined: Feb 07, 2003
Posts: 34
I have these 2 codes both placed in the same package called file is called and the other called uses have put c:\moreservlets in my classspath along with "." but my file helloservlet does not compile it gives an error on the line where i use a static method from in access modifier is public for both classes.Can u help me out with what the error might be??
Avi Abrami
Ranch Hand

Joined: Oct 11, 2000
Posts: 1141

Hi Madhu,
The servlet engines that I have worked with all use their own CLASSPATH -- which is totally independent of yours! So you need to configure your servlet engine's CLASSPATH -- to include "C:\moreservlets".
How you configure the servlet engine's classpath depends on the servlet engine you are using -- but I'm sure the details can be found in the documentation (for your servlet engine).
Hope this helps.
Good Luck,
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Avi... the problem was with compilation.

madhu, I think I recognize a few names in your post. Are you looking at moreservlets ?

Try this post:

The most important bit of that post is where I link to *another* post... (for the short version, just go here):

The important part of THAT post is mine, at the very bottom
I agree. Here's the link:
subject: servlet packages problem
It's not a secret anymore!