Hi, Please read http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/ On Jul 19, 2015 5:00 PM, "Peter Henderson" <[email protected]> wrote:
> 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. > > > > > -- > Peter Henderson > > Director > Starjar Ltd. > www.starjar.com > 0330 088 1662 >
