You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Delange <de...@telfort.nl> on 2012/12/26 13:54:30 UTC
How to resolve right path for variable images (with Jetty)
In my webapplication a user can upload images. They are displayed on other
pages.
When I start the application with Jetty from the Eclipse directory, all
images are stored directly under the project folder.
But when I want to display them, they must be under src/main/webapp/
The is caused by the ContextRelativeResource. If I don't use this it doesn't
work
Has anyone a solution for this strange effect?
My directory structure in eclipse is:
mywebapplication
images
photos
pic001.jpg
src
main
java
...
resources
...
webapp
images
photo
pic001.jpg
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-resolve-right-path-for-variable-images-with-Jetty-tp4655058.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: How to resolve right path for variable images (with Jetty)
Posted by Delange <de...@telfort.nl>.
Do you have an example, also with html?
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-resolve-right-path-for-variable-images-with-Jetty-tp4655058p4655088.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: How to resolve right path for variable images (with Jetty)
Posted by Martin Grigorov <mg...@apache.org>.
Use ByteArrayResource instead that loads the image's bytes from wherever
you need.
On Wed, Dec 26, 2012 at 2:54 PM, Delange <de...@telfort.nl> wrote:
> In my webapplication a user can upload images. They are displayed on other
> pages.
>
> When I start the application with Jetty from the Eclipse directory, all
> images are stored directly under the project folder.
> But when I want to display them, they must be under src/main/webapp/
> The is caused by the ContextRelativeResource. If I don't use this it
> doesn't
> work
>
> Has anyone a solution for this strange effect?
>
> My directory structure in eclipse is:
> mywebapplication
> images
> photos
> pic001.jpg
> src
> main
> java
> ...
> resources
> ...
> webapp
> images
> photo
> pic001.jpg
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/How-to-resolve-right-path-for-variable-images-with-Jetty-tp4655058.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>