webtier@glassfish.java.net

Re: reading text file in servlet

From: Jan Luehe <Jan.Luehe_at_Sun.COM>
Date: Thu, 12 Mar 2009 10:05:35 -0700

On 03/11/09 09:33 PM, glassfish_at_javadesktop.org wrote:
> I would like to deploy my app using war file by putting the war in autodeploy folder. Many of my servlets need to read a common text file for data they need and I obviously don't want to code the full path of the file in each and every servlet. Glassfish default the working folder to config of the domain. Is there a way to tell Glassfish that the default folder of my app is somewhere else?
>

Yes, you can do this by configuring alternate docroots in your sun-web.xml

Please see

  http://blogs.sun.com/jluehe/entry/alternate_docroots_and_local_resource

and let us know if you have any questions.

Thanks

Jan

> [Message sent by forum member 'senderj' (senderj)]
>
> http://forums.java.net/jive/thread.jspa?messageID=336539
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>