I'm using wicket 1.2.6 and I'd like to display simple gif images. 

I have the following code in my constructor for WelcomePage: 
add(new Image("toplogo", new ResourceReference(WelcomePage.class,
                                "toplogo.gif")));

The html looks like:
..
<tr><td> </img></td></tr>
..

The toplogo.gif is located in the same directory as the WelcomePage.
When I load the application the page the images is distorted, it's like
somebody has "smeared" the image. The image looks alright if I display it in
an imaging program. The same thing happens with jpg and png images. I'm
using maven 2.0.7 and jetty and I'm not sure if this is a wicket, maven or
jetty problem. Has any experienced the same problem?

The second question is how I should go about to load an image that is
located in a resource folder (i.e. src/main/resources). If I just go with
add(new Image("toplogo", new ResourceReference(toplogo.gif"))), the images
is resolved to
http://localhost:8080/app/resources/wicket.Application/toplogo.gif, but I
want the image to be loaded from the resource root directory.

Thanks

-- 
View this message in context: 
http://www.nabble.com/Image-questions-tf4024374.html#a11430756
Sent from the Wicket - User mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to