views:

590

answers:

3

Where should I put the .html files in a wicket Application?

my current project layout is as follows:

src/myproject
  --classes+ duplicated html files
web
--numerous .html files - previewed
web/img
--resource files such as css/png/js files

i want to avoid putting the html files on dupliate locations. what is a good non-redundant strategy to put the html and resource files? this is using tomcat so obviously, when deployed the directory structure changes to

img
WEB-INF
WEB-INF/classes/myproject

and the .html files stay at the toplevel, as well alongside the .class files - which is bad.

of course, the preview function in plain html should have no problems with relative paths

are there any examples for this? do i need special code (such as a IResourceStreamLocator) in my wicketappllication class?

i am using wicket 1.4-rc1.

A: 

so after gathering some experience with wicket, it turned out that the default location for the html files is just fine. no need to reinvent the wheel.

you can link resources without troubles with relative paths, and still preserve the preview ability.

Andreas Petersson
A: 

I would suggest using Maven to build your application. Never depend on an IDE to build your application. IDE's might differ between developers. When you want to use a CI server you need to fall back to scripting if you don't use a build system.

Maven also separates resources from sources.

Although Maven requires some time to get into it is very much worth the effort.

Ivo Limmen