*
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


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

servlet directory structure

Ramsvi R
Greenhorn

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 file.it keeps giving null pointer exception

thanks ..
Ben Souther
Sheriff

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
Rancher

Joined: Mar 22, 2000
Posts: 12759
    
    5
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.
Bill
Ramsvi R
Greenhorn

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

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

svi_r
Ben Souther
Sheriff

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.
-Ben
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: servlet directory structure
 
Similar Threads
package,classpath and servlet
bad class file error, compiling with packages
servlet exception
Packaging applet in web application
JDBC / Applets.