a good tutorial for constructing URLS is located here
http://www.javaworld.com/javaworld/javatips/jw-javatip66.html


<html>
<body>

In my situation I have a contextPath which points to 
$CATALINA_BASE\webapps\WebAppName (so this href tag will display 
AutoCompleteServlet.java.txt)
<a 
href="${contextPath}/src/org/ajaxtags/demo/servlet/AutocompleteServlet.java.txt">Java
 source</a>

I could have just as easily setup to point to a local file in Unix such as 
<a href="file:///user/martin/index.html">Index.html</a>

or to point to a local file on a windows box
<a href="file://C:\\user\\martin\\index.html">Index.html</a>

</body>
</html>

HTH
Martin --
--------------------------------------------------------------------------- 
This e-mail message (including attachments, if any) is intended for the use of 
the individual or entity to which it is addressed and may contain information 
that is privileged, proprietary , confidential and exempt from disclosure. If 
you are not the intended recipient, you are notified that any dissemination, 
distribution or copying of this communication is strictly prohibited.
--------------------------------------------------------------------------- 
Le présent message électronique (y compris les pièces qui y sont annexées, le 
cas échéant) s'adresse au destinataire indiqué et peut contenir des 
renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le 
destinataire de ce document, nous vous signalons qu'il est strictement interdit 
de le diffuser, de le distribuer ou de le reproduire.
----- Original Message ----- 
From: "Caldarale, Charles R" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Monday, January 01, 2007 1:26 PM
Subject: RE: How to set up a special folder to list all files under it?


> From: Caldarale, Charles R 
> Subject: RE: How to set up a special folder to list all files 
> under it?
> 
> You don't have to create any classes.  Just do what I said in 
> the original response, which is to copy the existing 
> declaration for the default servlet from conf/web.xml to your 
> own WEB-INF/web.xml.

In case I didn't make it clear before, the idea is to create a copy of
the default servlet specifically for your webapp.  This renamed copy
will allow access to and listings of the directory specified in its
<url-pattern>, and nothing else.  The normal default servlet would
continue to supply static content for all other paths, without exposing
their directory structure.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to