struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <>
Subject Re: OutputStreamPath
Date Thu, 01 Mar 2007 19:01:40 GMT
--- Daniel Chacón Sánchez <>
> 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).


Sucker-punch spam with award-winning protection. 
Try the free Yahoo! Mail Beta.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message