Re: What are valid URL for calling servlet ?

Gildas Mazery wrote:

> I have encounter some difficulties while setting up servlets with jigsaw.
> And I think I am not the only one in this mailing list. My problem comes
> from servlet that were not design for jigsaw, but for other web server.
> They will work correctly only if they are setup manualy in a directory that
> is not the default one, and with a name that is not necessarily the name of
> the class file of the servlet.
>
> According to the doc of the servlet runner in JSDK, it seems that the
> standard URI for calling a servlet is :
>    /servlet/<servlet_name>
> where "servlet_name" can be find in the file named : "servlet.property".
>
> It seems to me that jigsaw use URI like :
>    /<servlet_setup_directory>/<servlet_name>
> where <servlet_setup_directory> can be every directory you choose, and
> default to "servlets" (not "servlet")
> where <servlet_name> default to the name of the class file without ".class"
> if the default servlet indexer is used.
>
> 1. There are examples of servlets that work fine with servlet runner but
> don't with jigsaw when those servlets are set up in the default directory
> "servlets". This problem can be easily solve by manualy setting those
> servlets in the directory "servlet". The fault doesn't fall to the servlet
> code nor to the HTML code that is use for calling the servlet.
> I think it is due to the way jigsaw understand the URI for calling servlet.
> While processing a "standard" URI : "/servlet/<servlet_name>" jigsaw seems
> to beleave that "servlet" is a directory name where to find a resource
> named <servlet_name> and if this directory does not exist, jigsaw will
> complain. With the default setting this directory won't exist and the
> servlets are in the directory "servlets" and can be reach with the URI
> "/servlets/<servlet_name>" but not "/servlet/<servlet_name>".
> If HTML code, in a file or generate by a servlet, use standard URI and if
> the servlets are setup in the default directory, then the call to that
> servlets will fail.
>
> 2. I suspect that an HTML page or a servlet that generate HTML, developed
> and tested using jigsaw, can be unusable with other web server if it
> doesn't use "standard" URI for calling servlets. (example URI :
> "/foo/test.html", with jigsaw can call a servlet set up in directory "foo"
> with the name "test.html", but I am not sure this URI can properly call a
> servlet with all web server)
>
> Fortunatly the syntaxe require by the "standard" URI and the syntaxe
> require by jigsaw can meet each other if servlets are set up in the
> directory "servlet" (without "s"), with a name define as it is in the file
> "servlet.property".
>
> Am I missing something ? Is there a good cause for jigsaw and it's
> documentation to use as default directory "servlets" but not "servlet" ?

No, Actually we didn't thought it was really important, but users seems to
thinks it is. So servlets will be changed to servlet in the next release.

Regards, Benoit.


--
- Benoît Mahé -------------------------------------------------------
                      World Wide Web Consortium (W3C)
                    Architecture domain - Jigsaw Team

  http://www.w3.org/People/Mahe - bmahe@w3.org - +33.4.92.38.79.89
---------------------------------------------------------------------

Received on Thursday, 18 February 1999 08:04:44 UTC