Use structure: .src .....java ..........com ...............myapp ...................[HTML & Java go here] ...............img ...............css ...............somethink else you would like
In img dir put Images.class, in css put Styles.class and so on, for example: package com.myapp.images; public class Images{ } Then in WebApplication.init() do: mountSharedResource("/img/myimage.jpg", new ResourceReference(Images.class, "myimage.jpg").getSharedResourceKey()); and in html file do: <img src="./img/myimage.jpg"/> No need to do something else in html. Hope this helps. Miro > -----Original Message----- > From: eugenebalt [mailto:eugeneb...@yahoo.com] > Sent: Wednesday, 27. July 2011 00:04 > To: users@wicket.apache.org > Subject: Static Files (CSS, JPG) not Found by Wicket in HTML > > My project structure looks like this: > > .src > .....java > ..........com > ...............myapp > ...................[HTML & Java go here] > > .web > .....img > .....css > .....WEB-INF > > > In my HTML, when I reference "img/image.jpg" or > "css/main.css", these files are not found. I also tried > "/img/image.jpg" and "/css/main.css" and that doesn't work either. > > Thanks > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Static-Files-CSS-JP G-not-Found-by-Wicket-in-HTML-tp3697146p3697146.html > Sent from the Users forum mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org