Hi Neha,

You can basically put it wherever you want because your servlet can get
direct file system access (I'm not sure this is true if deployed in an
EAR, but I guess that's not an option here anyway).

Where it *makes sense* to put it is up to you... if it's something
specific to the webapp then it probably makes sense to put it somewhere in
the webapp's directory structure, but if it's more a shared data type
thing, it might make sense outside the webapp.

Take a look here:

http://cvs.sourceforge.net/viewcvs.py/javawebparts/javawebparts/WEB-INF/src/javawebparts/servlet/TextReturnerServlet.java?view=markup

Scroll down to the init() method and see how it gets an InputStream to the
itemsFile.  This is how you can do it context-relative.  If you want to go
to something outside the webapp, take a look at
ServletContest.getRealPath().

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]

On Wed, January 18, 2006 12:40 pm, Neha Narkhede said:
> Hi..
>    I am running a servlet which requires some data files.
> But I dont know where to paste those data files so that the servlet can
> find it.
> I have a servlet "Indexer" and so a folder 'Indexer" in webapps.
>
> Please help..
>
> Thank you.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to