- From: Gildas Mazery <mazery@agence.cpu.fr>
- Date: Mon, 1 Feb 1999 04:09:37 -0500 (EST)
- To: www-jigsaw@w3.org
Hi, Well, I apologize, what I wrote is wrong >You've got to configure jigsaw with jigadmin to look for your servlets if >you do not put then in a directory name "servlet" whitout "s". The default >indexer of jigsaw for servlet will not search servlet in an other directory. that's exactly the opposite the default indexer search sevlet in a directory name "servlets" >There is a problem because sun servlets assume that they are in a directory >name "servlets" but when referring each over they act as if they were in a >directory names "servlet" !!! I think their is a king of logical path that >is not present in jigsaw, or it is a problem in sun spec for servlet. Well well that is not very clear and false. According to JSDK doc the way to call a servlet from a browser is to use an URI like : /servlet/<servlet-name>/<path-info>?<query-args> where the first word "/servlet/" say to the server that what is following is a servlet call. But jigsaw seem's to consider "/servlet/" as a directory name where to search for a ressouces that can be any kind of ressource the server is aware of, anong witch are the servlets. So a servlet call that conform with /servlet/<servlet-name>/<path-info>?<query-args> will work with jigsaw if the servlet that is called is located in a directory name "servlet" and if this directory has been properly set up with jigadmin, (with a ServletDirectoryFrame) and the servlet set up with a ServletWrapper. Those setting nust be done manualy because the default indexer for servlet only take in account the directory "servlets" So if you want to create a servlet that produce HTML code including call to other servlets and want the whole set of servlets to work with other servers than jigsaw, you've got to conform to the standard calling syntaxe, and not use the possibilities offered by jigsaw : calling servlets juste giving its directory follow by its name. As a consequence you've got to put your servlets in a directory name "servlet" and do the setting up manually. In conterpart of this manual work jigsaw offer a great ease of use for the developper : it will automaticaly reload a servlet when the class file is changed, no need to stop and restart the server. You can find a illustration of this setting up problem with the example "bookstore" in sun's java tutorial. This example work with servletrunner but does not work with jigsaw's default setting. This example is a set of servlets that generate HTML code. This code contains link to some servlets of the set, those links are hard code like this one : <a href="/servlet/showcart"> Check Shopping Cart</a> This URI respect the standard way to invoke a servlet in any server as it is said in JSDK doc. But this URI won't work with jigsaw if you just put the servlets in the directory "servlets" and let the default indexer doing the setting up of the servlets. This exampe will work if you put the servlets in a directory named "servlet" and make the setting up yourself. With the default setting the URI : <a href="/servlet/showcart"> Check Shopping Cart</a> will not work because jigsaw mistake "/servlet/" for a directory name that does not exist. One top of that jigsaw will not find the servlet "showcart" because the indexer does not take in account the servlet.properties file and use the classes file name as the servlet name (here the class file for the servlet "showcart" is "ShowCartServlet.class". To conclude, you can create servlet with jigsaw that can work with other server if you do not use all jigsaw possibilities for calling servlet. Gildas Ps : sorry for my poor english, and my previous erroneous message
Received on Monday, 1 February 1999 04:11:29 UTC