cool.

the home page you see when accessing http://localhost:8080/ is mapped
to the <jsdk-install-dir>/webpages/index.html. the following should help
with regards to the servlet mapping stuff.

hope this helps,

- james

> now, as to your friends question. in jsdk2.1 there is the notion of a
> "webapp" (or context). you can add as many webapps to your servlet
> as you'd like by adding a pair of the following lines for each webapp:
>
> server.webapp.AppId.mappping=/AppURL
> server,webapp.AppId.docbase=AppDir
>
> a webapp directory structure consists of a couple of specific
sub-directory
> structures (i won't go into detail here unless you have further
questions)
> with which you can use the webpages or examples directory structures
> provided with jsdk2.1 as examples.
>
> for example:
>
> copy (recursively) webpages to foo and bar.
>
> add the following to default.cfg
>
>     server.webapp.foo.mapping=/foo
>     server.webapp.foo.docbase=foo
>
>     server.webapp.bar.mapping=/bar
>     server.webapp.bar.docbase=bar
>
> start the server and you should be able to make requests as follows:
>
>     http://localhost:8080/                  maps to webpage/index.html
file
>     http://localhost:8080/examples    maps to examples/index.html file
>     http://localhost:8080/foo             maps to foo/index.html file
>     http://localhost:8080/bar             maps to bar/index.html file
>
> now, servlets which reside in any of the afore mentioned webapps can
> be accessed via:
>
>     http://localhost:8080/servlet/FooServlet
>                                                      maps to
> webpages/WEB-INF/servlet/FooServlet
>     http://localhost:8080/examples/servlet/FooServlet
>                                                      maps to
> examples/WEB-INF/servlet/FooServlet
>     http://localhost:8080/foo/servlet/FooServlet
>                                                      maps to
> foo/WEB-INF/servlet/FooServlet
>     http://localhost:8080/bar/servlet/FooServlet
>                                                      maps to
> bar/WEB-INF/servlet/FooServlet
>
> so, place your ServletTest in any of the afore mentioned servlet
specified
> directories and you should be able to access it accordingly.
>



#YANG YUE XIANG# wrote:

> Hi
>
> Sorry for such a simple question!
> I am new to server and servlet.
>
> I installed JSDK in my computer. I can browse http://localhost:8080.
> But I am not sure which one in my harddisk is used as server,
> and where is the servlets.
> BTW, if having good materials about this problem, please let me know!
>
> Thanks very much!
> Yang Yuexiang

___________________________________________________________________________
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