I will look into your suggestion. Could you elaborate a bit on your
statement: "Using getRealPath() inside an app server of any kind is pretty
much always a Bad Idea"?

Thanks
Qiao

-----Original Message-----
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Friday, January 30, 2009 7:14 PM
To: Tomcat Users List
Subject: RE: application.getRealPath() in JSP from a subdirectory

> From: Qiao Jin [mailto:bra...@gmail.com]
> Subject: RE: application.getRealPath() in JSP from a subdirectory
>
> In my case, I need to list all the files under an image directory.

Perhaps you could use the customized directory listing capability of the
DefaultServlet:
http://tomcat.apache.org/tomcat-6.0-doc/default-servlet.html#dir

You could also use a filter to modify the output of the DefaultServlet
directory listing.

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to