That is the best thing you can do in wicket. They are called PackageResources which are added to our SharedResources (in application object)
quite a lot of examples do use them.

Just lookf for example that use the PackageResource, PackageResourceReference, SharedResources
For example we have _javascript_Reference that is build for _javascript_ files.

johan


On 2/28/06, smallufo < [EMAIL PROTECTED]> wrote:
Hi , I am new to Wicket.
I learn Wicket from the three tutorials in JavaLobby .
In the third tutorial : Let Components Contribute to the Header Section
( http://www.javalobby.org/java/forums/t61002.html )
The author added to PersonPanel.html
<script language="_javascript_" src="">

the src="" seems should be relative to the context root , not relative to the HTML file.

Therefore , if I open PersonPanel.html with DreamWeaver or HTML editor , it will report resource not found error.
How to solve it ?

I think this problem will also occur in <IMG> tag...

I remember when I used Tapestry (long ago , about 2 years) , it can "deliver" resources from within WEB-INF/classes/....
That is , I can easily put _javascript_s, Images , and HTML files in to src/classes folder , writing relative resources and correct intepreted by HTML editor , and tapestry can handle it... just like this :

WEB-INF/src[classes]/com/xxx/wicket/Person.html
WEB-INF/src[classes]/com/xxx/wicket/sorttable.js
WEB-INF/src[classes]/com/xxx/wicket/Person.jpg

Will Wicket allow this ?

PS : I know this may be resolved by moving src outside WEB-INF (up one directory) , but I just get used to put src into WEB-INF... (because outside WEB-INF is accessable by web server... , not secure)


Reply via email to