Jar? I don't know about you but my webapps build to a WAR and the compiled 
classes are in WEB-INF/classes/.... *This* is the Maven default.

If the idea is to create truly reusable components, then don't do it in the 
same project, create a supporting components project that *will* package as a 
JAR and create them there, then you can use them however and whenever you wish. 
In your model you'd be including a whole heap of unnecessary dependencies.

Perhaps the original poster has a designer that wants to edit them without 
being muddled by other files. IMO you should be able to put them anywhere and 
for any reason. And you can, easily.
http://cwiki.apache.org/WICKET/control-where-html-files-are-loaded-from.html
See the Wicket 1.3 section.

To the original poster, it is very simple to move the HTML resources elsewhere 
(see above). You can also keep the CSS and images in your webapp's context, 
there is no special setup needed for that.  In your page you can use an 
IHeaderContributor to load in the css/js etc:
response.renderCSSReference("css/somefile.css");
response.renderJavascriptReference("javascript/somefile.js");
                
both of which live in the css and javascript directories in my webapp directory.

cheers,
Steve


On 07/12/2009, at 2:24 AM, McIlwee, Craig wrote:

> I agree that you should have a strong reason to change the default, and IMO 
> 'I don't like it' isn't good enough.  What happens if you want to reuse 
> components that live in that jar elsewhere?  Putting the jar that contains 
> the component on the classpath won't be sufficient because you'll only get 
> the .class file and not the HTML/CSS/JS.  This probably means that you'd have 
> to check in those resources in multiple locations or have them copied from 
> one location to another during your build process - both of which are more 
> error prone and/or maintenance hassle than just putting them in the package 
> with the class.
> 
> Craig
>  _____  
> 
> From: Johan den Boer [mailto:[email protected]]
> To: [email protected]
> Sent: Sun, 06 Dec 2009 02:17:04 -0500
> Subject: Re: Location of html files
> 
> 
>  Hi,
> 
>  I not like my html files / css files / images are all locates in the same
>  package but seperated in directories i.e.
> 
>  html files goto  ../html
>  css files go to  ../css
>  images go to   ../images
> 
>  why is this not possible
> 
>  johan
> 
> 
>  Marat Radchenko-2 wrote:
>> 
>> With custom IResourceFinder, you can put them wherever you want. But
>> why? You should have a strong reason to not follow defaults.
>> 
>> 2009/12/6, Johan den Boer <[email protected]>:
>>> Hi,
>>> 
>>> I place my html files in the same package where my java classes resides.
>>> Is
>>> it possible to change this. I want to place my html files in the
>>> WEB-INF/page directory
>>> 
>>> --
>>> thanks a lot,
>>> 
>>> 
>>> Johan den Boer
>>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>> 
>> 
>> 
> 
>  -- 
>  View this message in context: 
> http://old.nabble.com/Location-of-html-files-tp26662782p26662799.html
>  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