Actually it does work when the image is in the same directory as that of the
page (same with the example u pointed out)..how would i refer to an image
which is altogether is a different structure...

lets say my page is at org.xyz.util [page.html] and from within it i want to
refer to an image which is in the images directory...

using 

add(new Image("taxCientLogo", new Model("images/company-logo.jpg")));
add(new Image("taxCientLogo", new Model("/images/company-logo.jpg")));

makes it look inside util and appends the above path..





Eelco Hillenius wrote:
> 
>> but i am wondering as to how would i make it work wicket such that image
>> gets
>> fetched from the classpath and not relative to the application root..
>> So basically here is my scenario, i have jar bundled with the page
>> components and in them i want to refer to the images (bundled within the
>> jar
>> only).
>>
>> This jar will eventually be bundled within a war application which will
>> be
>> using these components.
> 
> Wicket reads packaged resources from the classpath, including
> individual jars. For instance, look at the date picker in
> wicket-datetime. That has a whole bunch of CSS/ JavaScript and even
> image dependencies that all get served from the jar.
> 
> Eelco
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/packaging-images-css-in-a-jar--tf4772567.html#a13653772
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to