There are several possibilities here.

Dynamic approach
Needed in the following cases:
 - resource needs to be generated
 - resource comes from external, non-web system (database, etc)
 - resource must be filtered (component id's subsitution, etc)
 - resource must be packaged with your component

Static approach
Needed in the following cases:
 - absolute performance requirements -> static resources served by webserver, not servlet
 - static files, no special requirement for dynamic content
 - ?

In the dynamic approach the resources need either to be registered at load time (this will change I think), or generated on the fly as needed. Resource source files should be available on the classpath, but need not be (provide your own resolver).

In the static approach, you put the files in the webroot and thus have them available to link from your pages.

com.foo.Index.html
<html>
<head>
<style src="" type="text/css"></style>
<script src="" type="text/_javascript_"></script>
</head>
<body>
</body>
</html>

and directories:

src/webapp/style/style.css
src/webapp/prototype/prototype.js
src/webapp/WEB-INF/web.xml
src/main/java/com/foo/Index.html
src/main/java/com/foo/Index.java

Not complete, but a start.

Martijn

On 3/17/06, Bruno Borges <[EMAIL PROTECTED]> wrote:
I've seen some threads in the mailing-list archive, and for I understand, there's no common way to deal with resources like those in the subject.

Could you guys please list what's the best approaches to deal with images, so programmers and designers can work together without any problem? I wanna see developers coding the html files, and designers specifying images in these pages, so the images can be displayed in the same way at development time (WYSIWYG HTML Editors) and at runtime.

The same question for _javascript_ files (.js) and stylesheet files (.css).

And after that, we could put all information together and submit to the Wiki.

Thank you!

--
Bruno Borges - SCJP 1.4
[EMAIL PROTECTED]



--
Wicket 1.2 - Write AJAX applications without writing _javascript_
http://wicketframework.org

Reply via email to