hmmmm ... a little bit of clarification in the provided example:
After that, jswdk always maps http://localhost:8080/pfex to
the local and relative directory sub1/sub2 and according to an
implicit convention, it also maps http://localhost:8080/pfex/servlet to
the local and relative directory sub1/sub2/WEB-INF/servlets.
So in order to call a servlet named "s1" which is physically located
"sub1/sub2/WEB-INF/servlets/s1.class" directory, you only need to
refer to http://localhost:8080/pfex/servlet/s1
the key, as is see it, is to realize that a single web server can now
support many document bases. the document base mapped to "/"
is equivalent to the singular document base concept supported by
most web servers today.
also note that it is possible to specify other docBase types, including:
absolute file paths
http uri (effectively making the hosting server a proxy server)
web application archives (aka war or jar files; your web application
runs out of a single file making distirubtion, versioning and the
like pretty trivial
hope this helps,
- james
Mohammad Kargar wrote:
> Hi Mr. Chang
>
> In jswdk we use web application concept to define a URI prefix. For example,
> by adding the following line into your "webserver.xml" file, you define an
> URI prefix called "/pfx" that is assigned to the "sub1/sub2" directory in
> your jswdk's home directory.
>
> <WebApplication id="WebApp1" mapping="/pfx" docBase="sub1/sub2"/>
>
> After that, jswdk always maps http://localhost:8080/pfex to
> http://localhost:8080/sub1/sub2 and according to an implicit convention, it
> also maps http://localhost:8080/pfex/servlet to
> http://localhost:8080/sub1/sub2/WEB-INF/servlets.
> So in order to call a servlet named "s1", which has been defined in the
> "sub1/sub2/WEB-INF/servlets" directory, you only need to refer to
> http://localhost:8080/pfex/servlet/s1
>
> FYI: see FAQ.html in the jswdk's home directory for more information about
> web application.
>
> bi
> Mohammad Kargar
>
> ___________________________________________________________________________
> 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