Rats, replied to the wrong mailing list -- this question was originally posted on SERVLET-INTEREST. Craig "Craig R. McClanahan" wrote: > Ted Neward wrote: > > > Normally, in a web server, if a given file in a directory is marked > > "index.html" (or similarly-named, site-configurable filenames), that file > > will be used as the "default" HTML document sent back to the user when just > > the directory name is given (that is, > > http://www.javageeks.com/foo/bar/blah/index.html will be returned when > > http://www.javageeks.com/foo/bar/blah is requested). > > > > With JSWDK, this doesn't appear to be the case. > > > > The JSWDK (jswdk1_0-win.zip, file size 759,251) I downloaded and installed, > > when given a URL of > > > > www.javageeks.com:8080/webpages/ > > > > doesn't display anything--it gives a 404 error. Now, "webpages", presumably > > the webapp for the "webpages" directory under the JSWDK-1.0 directory, also > > isn't defined in the webserver.xml file, either; perhaps this is an > > oversight, perhaps not. However, doing the same with the "examples" webapp, > > > > That's because this is not a valid URL for the default setup. "webpages" is > the document root directory of the default context, but it's mapped to the "/" > URL -- because it is the default. The URL to try is: > > http://www.javageeks.com:8080 > > or > > http://www.javageeks.com:8080/ > > instead, which correctly displays the index.html page found in this directory. > > > > > www.javageeks.com:8080/examples/ > > > > yields a directory listing of the "examples" subdir under the JSWDK-1.0 > > install directory. > > > > That's the right answer -- in the "examples" directory (which is the document > root for the "examples" context), there is no index.html file, so a directory > listing is the usual response (this is also true of most web servers, unless > the administrator disables it). Try this one instead: > > http://www.javageeks.com:8080/examples/jsp/ > > and you will see the index.html page that is found there. > > > > > What gives? The "webapp.properties" file has a setting, "welcomefiles", that > > would seem to indicate this functionality is doable, yet none of the samples > > seem to use it; the default JSWDK home page, for example, HREFs directly to > > examples/servlets/index.html or examples/jsp/index.html. Is this a bug, or a > > feature, or just an oversight, or what? Has anybody gotten this to work > > correctly? > > > > Are you sure you're using the final relase version? In the default index.html > page, the link to the JSP examples says: > > <a href="examples/jsp/">JSP Examples</a> > > which expands to an absolute URL like the second one quoted above. However, > the feature is working correctly for me. > > NOTE: The early access version of JSWDK had a bug when you tried to use a > JSP page as your welcome file -- it would display the contexts of the JSP page > as text, instead of compiling and executing it. It did the right thing on HTML > welcome pages, however. I understand that this was fixed in the final release, > but haven't tried it myself. > > > > > Ted Neward > > Craig McClanahan > > =========================================================================== > 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 ___________________________________________________________________________ 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
