Eclipse + Tomcat problem [message #200046] |
Sat, 17 March 2007 14:26 |
Eclipse User |
|
|
|
Originally posted by: lvw.tlen.pl
Hi,
I've installed WTP Eclipse, and everything works well beside one matter:
when my servlet is saving a file by this code:
t.transform(new DOMSource(xmlDoc), new StreamResult(
new FileOutputStream("final.xml")));
the final.xml document is saved in the Eclipse main directory, how can I
adjust the properties to save this file in folder where the servlet is
running?
Thanks for answer.
|
|
|
Re: Eclipse + Tomcat problem [message #200468 is a reply to message #200046] |
Mon, 19 March 2007 15:55 |
Eclipse User |
|
|
|
Originally posted by: wayne.beaton._NOSPAM_eclipse.org
Open the run configuration ("Run > Run..." from the menu and select your
configuration on the left). Switch to the "Arguments" tab and set the
"Working Directory".
As a general rule, writing a file from a servlet is a bad idea.
Especially one with an absolute name. What happens when two users hit
the servlet at the same time? Or 100?
HTH,
Wayne
Kanan wrote:
> Hi,
> I've installed WTP Eclipse, and everything works well beside one matter:
> when my servlet is saving a file by this code: t.transform(new
> DOMSource(xmlDoc), new StreamResult( new
> FileOutputStream("final.xml")));
> the final.xml document is saved in the Eclipse main directory, how can I
> adjust the properties to save this file in folder where the servlet is
> running?
> Thanks for answer.
>
|
|
|
Powered by
FUDForum. Page generated in 0.08517 seconds