Per my understanding (through experience, trail and error) you must have your
servlets under the WEB-INF directory and then under servlets directory.  Also,
you should(must) have the following files under WEB-INF directory.
servlets.properties, mappings.properties, mime.properties, webapp.properties.
For servlets you need to worry about servlets.properties.    My test have all
been done on jwsdk-1.0.

For example:
I want to take files for Duke's Bookstores (including servlets) and open a web
page and have the server find them on the localhost.

I create a directory called mybkstore which needs to be under the jswdk
directory.  I make a copy of the entire WEB-INF directory (from an existing
directory) and place that under mybkstore.  I first go to the servlets
directory and get ride of all existing files.  I put all my Duke's Bookstores
files under the servlets directory(which is under WEB-INF).  Do any compiling
of the files. javac *.java (as required).

I then goto the mappings.properties and make it look like this.
# $Id: mappings.properties,v 1.3 1999/04/05 21:20:02 duncan Exp $

# Map servlets to paths
# Properties beginning with a . are extension properties, all other
# properties are path properties

/mybkstore=mybkstore
.str=store
.jsp=jsp

Then I go to servlets.properties file and make it look like this:
# $Id: servlets.properties,v 1.2 1999/04/02 02:04:22 duncan Exp $

# Define servlets here

# <servletname>.code=<servletclass>
# <servletname>.initparams=<name=value>,<name=value>

# This file contains the properties for the Duke's Bookstore servlets.

         # Duke's Book Store -- main page
         bookstore.code=BookStoreServlet

         # View all the books in the bookstore
         catalog.code=CatalogServlet

         # Show information about a specific book
         bookdetails.code=BookDetailServlet

         # See the books that you've chosen to buy
         showcart.code=ShowCartServlet

         # Collects information for buying the chosen books
         cashier.code=CashierServlet

         # Provide a receipt to the user who's bought books
         receipt.code=ReceiptServlet

The goto your webserver.xml (supplied with jswdk1.0) and add the mybkstore
along with the existing WebServer info as shown below:

<WebServer id="webServer">
    <Service id="service0">
        <WebApplication id="examples" mapping="/examples" docBase="examples"/>
<WebApplication id="mybkstore" mapping="/mybkstore" docBase="mybkstore"/>
       </Service>
</WebServer>

I also went to the startserver file and add mybkstore to the path.

set
beanJars=.\examples\WEB-INF\jsp\beans;.\webpages\WEB-INF\servlets;.\webpages\WEB-INF\jsp\beans;.\mybkstore\WEB-INF\servlets

Don't know if this is required but it does not hurt.

Finally, start your server and the type the servlet you want.  like
http://localhost/mybkstore/bookstore

Hopes this helps.




"Hilpert, Martin" wrote:

> > Hello!
> >
> > I installed JSDK and the JWSDK and all examples work.
> >
> > But how do I install (where, how is the file structure in the web server)
> > and how do I call (how is the URL of the servlet class) the servlet?
> > Unfortunately, I haven't found any documentation how to deploy a
> > "HelloWorld" Servlet...
> >
> > Any help?
> > Martin
> >
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to