Meaningless Drivel is fun!
The moose likes Beginning Java and the fly likes noob cp problems in webapp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "noob cp problems in webapp" Watch "noob cp problems in webapp" New topic

noob cp problems in webapp

La Noobie

Joined: Jun 12, 2003
Posts: 1
I'm trying to write a simple jsp/servlet app.
I have set up dir structure like this:
I have 2 classes called and both in package
I cannot compile because it cannot find Example1.class. I keep getting unresolved symbol errors. Here is part of my

This is one error:

Both Example1 and Example2 are in package I am compiling from within the classes/org/noobie/lamer/ directory and Example1.class exists there. Here is my javac command:

So what am I doing wrong?
Barry Andrews
Ranch Hand

Joined: Sep 05, 2000
Posts: 523

Compile them both together. javac *.java or better yet check out Ant.

Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
You need the classes directory in your classpath.
In your case "Root/WEB-INF/classes" must be in the classpath.
-Another Barry

Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63866

Do check out ant for simplifying your life immeasurably.
Also, you will find more JSP help in the JSP Forum.
And once you have your web server set up for your app context, the folder /WEB-INF/classes will automatically be in the server's classpath. No other special config is needed.

[Asking smart questions] [About Bear] [Books by Bear]
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
La Noobie,
Welcome to JavaRanch!
We ain't got many rules 'round these parts, but we do got one. Please change your display name to conform to the JavaRanch naming policy.

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Don't get me started about those stupid light bulbs.
subject: noob cp problems in webapp
It's not a secret anymore!