File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes servlet directory structure Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "servlet directory structure" Watch "servlet directory structure" New topic

servlet directory structure

Ramsvi R

Joined: Aug 31, 2006
Posts: 3
hello ,

Can some one tell me the directory structure of servlet when deployed on tomcat.I have an applet which draws a graph.Now these graph points are stored in an array and needs to be passed to servlet. But servlet cannot find the java class that performs this functin of getting and setting the value.on checking the applet viewer the graph is drawn.also values are set in array.But servlet cannot find the class keeps giving null pointer exception

thanks ..
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

mk mm,
Welcome to JavaRanch!

We're pleased to have you here with us in the servlets forum, but there
are a few rules that need to be followed, and one is that proper names are
required. Please take a look at the
JavaRanch Naming Policy and
adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

You can change it here

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13036
But servlet cannot find the java class

The location for the applet - which must be requested and loaded by the browser - can not be seen by the servlet engine. Place copies of the classes where the servlet gets its classes. Be sure that ALL classes are in packages and are located accordingly.
Ramsvi R

Joined: Aug 31, 2006
Posts: 3
Thank you very much.

Placing the the copies in relevant directories,did indeed help.

Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Ramsvi R,

Thank you for fixing your screen name.
Your current screen name still doesn't comply with the naming policy.
The first name can be an initial but the last name can not.

Please use the above link to fix this.
I agree. Here's the link:
subject: servlet directory structure
It's not a secret anymore!