Creating Folder within the webapps folder.

2011-11-22 Thread crackAT
Hy guys, 

I need help. I want to create a folder within the webapps folder so that
user can upload pics in it. 

The default Pics of the wicket java application will be loaded via
ResourceReference. Is there a way to create new resource folder with
ResourceReference?

Thanks for help. 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Creating-Folder-within-the-webapps-folder-tp4094979p4094979.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Creating Folder within the webapps folder.

2011-11-22 Thread Martijn Dashorst
This is a bad idea: when you redeploy your application, boom: gone are
the images. Store the images in a separate folder *OUTSIDE* your
webapp/container.

Martijn

On Tue, Nov 22, 2011 at 10:22 AM, crackAT manfred.kram...@everyone.at wrote:
 Hy guys,

 I need help. I want to create a folder within the webapps folder so that
 user can upload pics in it.

 The default Pics of the wicket java application will be loaded via
 ResourceReference. Is there a way to create new resource folder with
 ResourceReference?

 Thanks for help.

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Creating-Folder-within-the-webapps-folder-tp4094979p4094979.html
 Sent from the Users forum mailing list archive at Nabble.com.

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





-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com

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



Re: Creating Folder within the webapps folder.

2011-11-22 Thread crackAT
I did it outside. 

but the problem is, that wicket is using for every pic the resourcereference
and not only for the application pics. The application pics will be loaded
and i can see them but the userpics which are saved outside the webbapps
folder won't be loaded. 

Wicket is writing src=resources/clazz/  pathToOutsideUserFolder in the
source of the image but I told wicket this:

add(new Image(wicket-id, pathToOutsideUserFolder)

I didn't told wicket anything about the ResourceReference for this Pic.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Creating-Folder-within-the-webapps-folder-tp4094979p4095286.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Creating Folder within the webapps folder.

2011-11-22 Thread Vytautas R.
Hi,

1. I guess you need to extend org.apache.wicket.request.resource.
DynamicImageResource.
(for example,
http://code.google.com/p/xaloon/source/browse/trunk/xaloon-wicket/xaloon-wicket-components/src/main/java/org/xaloon/wicket/component/resource/FileResource.java
)
Then you should be able to load images from any place you like.

2. Mount your Resource:
String resourceKey = your key here;
getSharedResources().add(resourceKey, new FileResource());
mountResource(resourceKey, new SharedResourceReference(resourceKey));

3. Generate link to your image using Image, or custom implementation
(for example,
http://code.google.com/p/xaloon/source/browse/trunk/xaloon-wicket/xaloon-wicket-components/src/main/java/org/xaloon/wicket/component/resource/ImageLink.java
)


On Tue, Nov 22, 2011 at 1:24 PM, crackAT manfred.kram...@everyone.atwrote:

 I did it outside.

 but the problem is, that wicket is using for every pic the
 resourcereference
 and not only for the application pics. The application pics will be loaded
 and i can see them but the userpics which are saved outside the webbapps
 folder won't be loaded.

 Wicket is writing src=resources/clazz/  pathToOutsideUserFolder in the
 source of the image but I told wicket this:

 add(new Image(wicket-id, pathToOutsideUserFolder)

 I didn't told wicket anything about the ResourceReference for this Pic.



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Creating-Folder-within-the-webapps-folder-tp4094979p4095286.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




-- 
Best regards,
Vytautas R.
---
www.xaloon.org
www.allcarindex.com