tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From NBW <email...@gmail.com>
Subject Re: Using DefaultServlet for directory outside of webapps
Date Mon, 21 Apr 2008 21:43:03 GMT
You could write a simple servlet to serve up these images from any
accessible file system. The URL for it would look something like this:

http://yourtomcatserver/yourwebappcontext/getImage?name=Foo.gif

The the servlet would know what directory to look for images in and handle
streaming them out to the client. That would be a very flexible way of
solving the problem.

On Thu, Apr 17, 2008 at 11:48 AM, Zengfa Gao <zfgao@yahoo.com> wrote:

> Hi,
>
> For our application, we want to list/show a list of
> gif files. Currently we are using DefaultServlet with
> listings=true (web.xml). As the result, we can list
> the names of the file, and open the gif file under the
> our.war directory.
>
> For security reason, we are trying to list/show gif
> under other directory, not the directory of our.war.
> Is any setting for us to redirectory DefaultServlet to
> look at other defined directory? For example, if we
> put files under /var/opt/ourshare directory, how can
> we do it?
>
> Thanks a lot!
>
> Jeff
>
>
>
>  ____________________________________________________________________________________
> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile.  Try it now.
> http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>
> ---------------------------------------------------------------------
> 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message