YEs, you can place your CSS, JS, IMG/GIF etc. where your java and HTML resides and pack them into your jar file. You can refert to them in CSS like this
.myClass{ background-image : url("resources/com.mycomp.mypackage.ReferenceClass/picture.gif"); } an e.g. render the references into HTML's head section like class MyComponent { add(new AbstractBehavior() { private static final long serialVersionUID = 1L; @Override public void renderHead(final IHeaderResponse response) { response.renderCSSReference(/* look into JavaDoc*/); } } } or class MyComponent { add(new HeaderContributor(/* look into JavaDoc */)); } There are more different ways to do this but it's a good starting point for reading documentation. But if You do this: be sure to read Wicket Mailing list. There were some issues with too many open files when Wicket reads thoses resources form jar files. Stefan -----Ursprüngliche Nachricht----- Von: Ashika Umanga Umagiliya [mailto:auma...@biggjapan.com] Gesendet: Donnerstag, 4. Februar 2010 02:57 An: users@wicket.apache.org Betreff: Loading resources (CSS,JS) from JARs ? Greetings, While playing around with wicket-stuffminis , I noticed that the Moontip load its CSS,JavaScript from the class path (wicketstuff-minis.jar) eg: http://localhost:8080/minis-examples/resources/org.wicketstuff.minis.mootipbehavior.MootipBehaviour/mootools.v1.11.js -which I couldnt find in the 'webapp' folder ,but in 'minis-1.4.2-SNAPSHOT-javadoc.jar' file. I was wondering,can I bundle my CSS,Js into JARs like this,without copying into 'webapp' folder? How does wicket process this ? Is it the path 'resources/' ? Thanks umanga --------------------------------------------------------------------- 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