Hi,

Maybe this is what you are looking for?

/wicket-core/src/main/java/org/apache/wicket/request/resource/UrlResourceReference.java

https://ci.apache.org/projects/wicket/guide/6.x/guide/resources.html#resources_6

kind regards

Tobias


Am 19.07.15 um 21:59 schrieb Peter Henderson:
Hi guys.

I have a choice and I'm looking for advice on choosing the correct solution.


I need to send images which are stored outside of the my web application.
I'd like the images to have a consistent URL (e.g.
/School/resources/images/activities/123.png)



Should I choose

1) Native HttpServlet,
Independent of Wicket
I'd have to use an attribute modifier on my <img> tag to point to the
Servlet
Needs to be mounted via Servlet xml or via guice or another filter.

2) Use ServletWebRequest
I get access to the Wicket session if needed.
Again have to use attribute modifier
Cant be mounted within my applications .init()

3) Use a resource
These seem to work but I must be using them incorrectly.
When mounting in the application I need a ResouceReference which needs to
build my resource. But that build resource is never used.
(gist https://gist.github.com/bollinger/b951ed7e85233188df9c)

This approach is really nice from the image user point of view.
add(new Image("img", new ActionImage(123))



Your help is appreciated.

Peter.






---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to