Le 07:39 16/09/99 +0800, Lee Jerry a �crit:
>I use use the kswdk1.0 . it is a sample
>web server .and I design a simple servlet.
>my question is :
>1. where should I put my servlet to ?
> in directory .../servelts/ ?
Jswdk 1.0 uses the concept of "web application" (webapp)
these webapp are declared in the webserver.xml file
here is a sample webserver.xml file
[...]
<WebServer id="webServer">
<Service id="service0" hostName="localhost" inet="192.168.0.180"
port="80" docBase="pictoris" workDir="work" workDirIsPersistent="true">
<WebApplication id="doconline" mapping="/doconline"
docBase="doconline"/>
<WebApplication id="demotech" mapping="/demotech"
docBase="demotech"/>
</Service>
</WebServer>
[...}
In this example, the default webapp is the one contained in the directory
Pictoris
so if I call http://192.168.0.180/
the web server displays http://192.168.0.180/pictoris/index.htm
You must place your servlets in <yourwebapp>/WEB-INF/servlets/
Let say you have a servlet called freethecheese.class (it's a very
political servlet)
To make it available from your default webapp (Pictoris in my example) ou
must place it in
pictoris/WEB-INF/servlets/
and call it by
http://192.168.0.180:servlet(WITHOUT "S")/freethecheese
If you wanted to make it available from another specific webapp other than
the default one ou place it in
<yourwebapp>/WEB-INF/servlets/
and call it with
http://192.168.0.180/<MY WEBAPP>/servlet (WITHOUT "S")/freethecheese
You may want to browse the archives,(Archives:
http://archives.java.sun.com/archives/servlet-interest.html
) there have been a lot of discussion on this subject this summer, the
jswdk webapp concept is a little bit disturbing at first but once you get
it it pretty logical and obvious to use.
+------------------------------------------------+
| Luc Saint-Elie |
| Development and marketing manager |
| Pictoris - Paris - France |
| http://www.pictoris.com |
| email : [EMAIL PROTECTED] |
+------------------------------------------------+
| Java Server Side Open Source technologies |
| http://www.interpasnet.com/JSS |
+------------------------------------------------+
___________________________________________________________________________
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