hi laird -

        the service has an internal mapping of "/"
        effectively is the default web application
        that will handle the inbound request should
        none of the peer web appliations mappings
        intervene. a service is also bound to a
        host/port tuple where as a web application
        is bound to a host/port/uri-mappings tuple.
        beyond that and possibly slightly different
        internal configuration settings, the difference
        between the default web application and any peer
        web application are nill.

        attached is a smidgen more info i posted to
        [EMAIL PROTECTED] the other day
        pertaining to docBase configurations.

        hope this helps,

- james

"Nelson, Laird" wrote:
>
> Could someone please tell me what the difference between a Service and a
> WebApplication is?
>
> Both have docbases, which is confusing me.  A docbase says to me that that's
> where the HTTP daemon goes on the file system to find something when a URL
> of a particular type is sent.  So I understand that a WebApplication element
> requires a docBase and a mapping attribute--the "mapping" is the URL
> matched, and the "docBase" is the filesystem location actually consulted.
> But a service has no such mapping attribute, so what could it possibly mean
> for a Service to have a docBase?
>
> Thoroughly mystified and feeling stupid,
> Laird
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> FAQs on JSP can be found at:
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html



[appologies if this hits the list more then once ... i
seem to be running into some problems when posting to
the list]

hi ted, et al -

        in addition to the replies you've received i'd like
        to add that you can readily change the default webApp
        document base (or any webApp document base) by:

                overriding the default Service.docBase attribute
                (or WebApplication.docBase for a non-default
                webApp) with a valid uri

                valid docBase uri formats include:

                        relative:       webpages

                                        this is the default
                                        format as delivered with
                                        the jswdk distribution

                        absolute:       file://localhost/foo

                        remote:         http://server:port/foo

                                        effectively a proxy server

                        note: we haven't thoroughly tested the
                                later two but the underpinnings
                                are there. some problems have
                                been reported when specifing
                                platform specific docBase uri's
                                (eg C:\foo) which should be
                                resolvable (ie bug fix)

                        <teaser>
                        with servlet 2.2 compliant servlet
                        containers one can specify a docBase
                        via a web application archive (war)
                        format which looks like:

                                war:file://localhost/foo/foo.war

                                         - or -

                                war:http://server:port/foo.war

                        this format follows the precedent set
                        by the jdk1.2 java.net.JarURLConnection
                        class jar url but one need not run over
                        jdk 1.2 in order to run a servlet 2.2
                        compliant servlet container.
                        </teaser>

        hope this helps,

- james

Ted Neward wrote:
>
> Thought I'd reply to both Craig and the list, just to bring closure to the
> issue.
>
> >> OK, but that still doesn't answer the underlying (perhaps implied yet not
> >> well-phrased) question--what do I need to do to get JSWDK to display
> >> "index.html" when the directory containing it is requested? I've put an
> >> "index.html" in the "examples" subdirectory, and when I offer a browser
> the
> >> <host>/examples URL, it still gives me the directory listing, which would
> >> indicate that it's not recognizing index.html as a "welcomefile". So
> what's
> >> the deal, then?
> >>
> >
> >Hmm, I just did the same thing and it worked fine.  I created a dummy index
> >file in:
> >
> >    $JSWDK_HOME/examples
> >
> >and, after I did that, either of the following URLs correctly displayed my
> >index file instead of the directory like they used to.
> >
> >    http://localhost:8080/examples
> >
> >    http://localhost:8080/examples/
> >
> >Are you sure you didn't modify the examples/WEB-INF/webapp.properties to
> remove
> >the "welcomefiles" property?  Did your "index.html" file show up in the
> >directory listing that was displayed (if not, it might be a file
> permissions
> >problem)?
> >
> Actually, the problem wasn't in the .properties files themselves, it was
> where they were located; I had them in the top-level directory, instead of
> in the WEB-INF directory. Once that was established, my "index.html" file in
> my custom webapp worked perfectly, as it did when I created a simple
> "index.html" file in the examples directory, as Craig described above.
>
> Once again, the issue was with the user, not the software. :)
>
> >For the record, this is JSWDK 1.0 final release, Linux (RH 6.0), and the
> >IBM 1.1.6 JVM -- although I doubt any of that makes any difference.
> >
> Also for the record, this was JSWDK 1.0 final release, Linux (RH 5.2), and
> the Blackdown JDK 1.2-pre3 release, although, as Craig noted, it didn't make
> any difference in getting everything to work.
>
> Thanks, Craig, for your assistance.
>
> Ted Neward
> Patterns/C++/Java/CORBA/EJB/COM-DCOM spoken here
> http://www.javageeks.com/~tneward
>  "I don't even speak for myself; my wife won't let me." --Me
>
> ___________________________________________________________________________
> 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