Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

Re: OutputStreamPath

Dave Newton

2007-03-01

Replies:

--- Daniel Chac?n S?nchez <danielccss@(protected)>
wrote:
> Someone?

Sorry it took me so long.

> I have a question, how I can set the path for the
> OutputStream like i get it for the InputStream with
> getResourceAsStream?

I'm not sure you can do that, particularly since a
resource might be inside a JAR file or be located in a
place you do not have write acess to.

If you know that the properties file is in a specific
place and that it makes sense to write to it then I
would think you'd use typical file i/o and determine
the path via getRealPath.

It confuses me why you'd want to do this in a webapp,
though. Settings you are likely to modify from within
the app should be in a database, not a properties file
(IMO, anyway).

d.




____________________________________________________________________________________
Sucker-punch spam with award-winning protection.
Try the free Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/features_spam.html

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.