Hi,

I think it is a problem of the response headers - you can also stream it from 
database with an AbstractResource and apply custom headers so that fancybox is 
handling it the way you want.

Anyway to store it first is not good at this point also because of performance.

kind regards

Tobias

> Am 03.02.2016 um 16:42 schrieb Karl-Heinz Golz <karl-heinz.g...@t-online.de>:
> 
> Hi,
> actually I use it as temp folder and it is OK when it is going to be
> erased after redeployment.
> 
> The business case is I want to show images via fancybox.
> I did that so far via dynamic link and when a user clicks a small image
> the data of the big image are delivered in onClick (read from database).
> 
> The problem is, fancybox does not handle that 100% correctly. For
> example, the automatic resize function does not work if the viewport is
> smaller than the image.
> But that works well when the images are stored on files. Therefore I'm
> going to add this interim step: if the user clicks the small image then
> the big image is written to a file and fancybox can read that.
> 
> Any recommendations how to handle that in a better way are very welcome.
> 
> 
>> Am 03.02.2016 um 15:19 schrieb Tobias Soloschenko:
>> 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
> 
> 
> ---------------------------------------------------------------------
> 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