-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jeff,
Zengfa Gao wrote: | 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? DefaultServlet cannot (currently) be targeted at a directory other than the root of the webapp. You could probably subclass DefaultServlet and modify its behavior such that you could re-target it to another directory using init-param elements or something like that. It looks like the init() method of DefaultServlet grabs a ProxyDirContext from the application scope. I'm guessing that's a JNDI context that is rooted in the current application's webapp root. By overriding init() (make sure you call super.init()!), you could probably re-target the "resources" member to another directory, and simply leave everything else alone. Hope that helps, - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkgHd+EACgkQ9CaO5/Lv0PBxiQCfboZKcnDiYpow+m30LFLlkSpO b0IAnAolLNXhaJIe7491fDmaQQUPxVBW =XxJE -----END PGP SIGNATURE----- --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]