| Author |
How to write a file in a web enviroment ?
|
Marcio Di Pietro
Greenhorn
Joined: May 30, 2003
Posts: 2
|
|
Friends, i'm using the example of upload that comes with the struts. The example works fine, but when a choose a path to save the uploaded file, i must to pass a concrete path, like "c:/.../img/teste.jpg" But the application is in the web, hosted in a server in any place. How can i define the target path to the file be saved in a web enviroment ?
|
Hey, who are you ?<br />Give me some code.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56529
|
|
|
Check out the ServletContext.getRealPath() method if you want to save the file within the app context, or specify the base path as an init parameter or property.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: How to write a file in a web enviroment ?
|
|
|