W3C home > Mailing lists > Public > www-jigsaw@w3.org > January to February 1999

What are valid URL for calling servlet ?

From: Gildas Mazery <mazery@agence.cpu.fr>
Date: Wed, 17 Feb 1999 10:59:54 -0500 (EST)
Message-Id: <>
To: www-jigsaw@w3.org
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 : 
where "servlet_name" can be find in the file named : "servlet.property". 

It seems to me that jigsaw use URI like :
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

Am I missing something ? Is there a good cause for jigsaw and it's
documentation to use as default directory "servlets" but not "servlet" ? 

Are jigsaw's URI a standard feature or is it the result of the full object
design of jigsaw ? (where a servlet is a ressource "mapped" in an object as
any other ressources the server is aware of, and then can be locate anywhere) 

In other words : Is the URI "/foo/test.html", that with jigsaw can call a
servlet, expected to work correctly with any other server ? 

If what I have said is correct, wouldn't it be more comfortable for
jigsaw's user if the default servlet directory was "servlet" instead of
"servlets" and if the servlet indexer could take in account the file
"servlet.property" when it exist, so the default setting in jigsaw could be
compatible with servlet runner.

All that I said about the word "standard" in this message is not sure but
just a guess, and I would be glad if somebody could definitively tell me
what is the right syntaxe of URI that call servlet.  

Received on Wednesday, 17 February 1999 11:05:40 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:33 UTC