tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kkus <kk...@hotmail.com>
Subject Re: How to set up a special folder to list all files under it?
Date Mon, 01 Jan 2007 17:20:22 GMT

Still confused with servlet class (FullPackageNameOfServletClass) here. What
is required in building such a class? Can you provide a sample? Thanks!


Martin Gainty wrote:
> 
> 1)yes you need to setup the listings options for your servlet in web.xml
> as in 
>    <servlet>
>        <servlet-name>NameOfServlet</servlet-name>
>        </servlet-class>FullPackageNameOfServletClass</servlet-class>
>         <init-param>
>             <param-name>listings</param-name>
>             <param-value>true</param-value>
>         </init-param>
>   </servlet>
> 2)make sure you copy your viewable (txt) files to the the
> webapps/WEBAPPNAME (Note the WEB-INF folder is for web.xml, /classes and
> /lib)
>  ${contextPath}/src/org/ajaxtags/demo/servlet/AutocompleteServlet.java.txt
> Java source 
> 3)ensure the files that you wish to view have an extension that your
> browser will know to associate with text editor(as in .txt extension for
> vi or wordpad)
> 
> (Expanding on previous poster's extremely late nite posting..)
> 
> M-
> --------------------------------------------------------------------------- 
> 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" <Chuck.Caldarale@unisys.com>
> To: "Tomcat Users List" <users@tomcat.apache.org>
> Sent: Monday, January 01, 2007 1:48 AM
> Subject: RE: How to set up a special folder to list all files under it?
> 
> 
>> From: kkus [mailto:kk_us@hotmail.com] 
>> Subject: How to set up a special folder to list all files under it?
>> 
>> Now I need add a specific folder which will let user to browse
>> all files under it without authentication.
> 
> I haven't personally tried the following, so take it with a grain of
> salt.  Also, others might know an easier way to accomplish what you
> want.
> 
> Delivery of static content and directory listings is under control of
> the default servlet, as defined in the conf/web.xml file.  By default,
> this has the listings param set to false, to disable ad hoc browsing.  I
> think you could copy the config for the default servlet, change
> <servlet-name> from default to something appropriate for your purpose,
> set the listings param to true, and add a servlet mapping for this
> renamed default to use a <url-pattern> pointing to the directory you
> want to store your public files in.  You would want to put this
> redefined servlet definition and mapping in the WEB-INF/web.xml of the
> webapp that will hold the public directory.
> 
>  - 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: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-set-up-a-special-folder-to-list-all-files-under-it--tf2903441.html#a8115081
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Mime
View raw message