Hi,

why do you want to write something into the path of a temporary deployed web 
application? The file is going to be erased after redeployment of your webapp.

I would consider a temp folder or a "working folder" for those files.

kind regards

Tobias

> Am 03.02.2016 um 14:48 schrieb Karl-Heinz Golz <karl-heinz.g...@t-online.de>:
> 
> thank you very much, now it works well with:
> 
> fos = new
> FileOutputStream(StartApplication.class.getResource("XXX").getPath() +
> "file1.jpg");
> 
> 
>> Am 03.02.2016 um 14:25 schrieb Ernesto Reinaldo Barreiro:
>> Hi,
>> 
>> StartApplication.class.getResource("HomePage.html").getUrl.getFile? Or
>> something similar? Mind that this might be inside a temp folder that will
>> be blown up next time you restart
>> 
>> On Wed, Feb 3, 2016 at 2:08 PM, Karl-Heinz Golz <karl-heinz.g...@t-online.de
>>> wrote:
>>> I'm using Tomcat 8.
>>> Writing to an absolute path (even outside of the application) works well:
>>> fos = new FileOutputStream("/home/XXX/file1.jpg");
>>> 
>>> Therefore I assumed that it should be possible inside of the
>>> application, too.
>>> I thought my problem is to correctly figure out the relative path.
>>> 
>>> 
>>>> Am 03.02.2016 um 13:29 schrieb Ernesto Reinaldo Barreiro:
>>>> Maybe I'm mistaken but I doubt in some application servers you might be
>>>> able to do that
>>>> 
>>>> On Wed, Feb 3, 2016 at 1:27 PM, Karl-Heinz Golz <
>>> karl-heinz.g...@t-online.de
>>>>> wrote:
>>>>> Hi,
>>>>> sorry for my simple question. I have already wasted some time  but it
>>>>> seems I have a blackout
>>>>> and therefore I want to ask you.
>>>>> 
>>>>> I need to write files to a folder XXX relative to the application
>>> classes:
>>>>> XXX
>>>>> StartApplication.java
>>>>> HomePage.java
>>>>> HomePage.html
>>>>> ...
>>>>> 
>>>>> The question is ??? in:
>>>>> FileOutputStream fos = new FileOutputStream (???);
>>>>> 
>>>>> many thanks in advance
>>>>> Karl-Heinz
>>>>> 
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to