How to separate java and html

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to separate java and html

Jesper Preuss-2
Hi,

I would like to be able to separate the java code and the html layout.

So I choose where the html lies for each html page. This is because I
would be able to let a html designer make the html and a programmer to
make the code.

Is this possible or not?

Preuss


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
<a href="http://ads.osdn.com/?ad_idv37&alloc_id865&op=click">http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Wicket-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wicket-user
Reply | Threaded
Open this post in threaded view
|

Re: How to separate java and html

jdonnerstag
Yeap.

public MyApplication() {
   addResourceFolder("YourResourceDirectory");
}

Thats it. You may define a web.xml parameter to init
"YourResourceDirectory" which makes it more flexible.

Juergen


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
<a href="http://ads.osdn.com/?ad_idv37&alloc_id865&op=click">http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Wicket-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wicket-user
Reply | Threaded
Open this post in threaded view
|

Re: How to separate java and html

Scott Sauyet-3
In reply to this post by Jesper Preuss-2
Jesper Preuss wrote:
> I would like to be able to separate the java code and the html layout.
>
> So I choose where the html lies for each html page. This is because I
> would be able to let a html designer make the html and a programmer to
> make the code.
>
> Is this possible or not?

Juergen pointed out a way to add an arbitrary directory to search for
markup.  That's often convenient, but I wanted something different.  I
like having the HTML and Java in the same folder at run-time, but I like
to develop with them separate so that I can at any time send a zip of
the HTML folder (including all images, javascript, and css) to the
designer.  Since my Wicket applications so far are quite simple, all the
views are in a single Java package, which has made it quite simple.

I use the folder layout below and in my build script copy the HTML to
the same directory as the class files and copy the image, js, and css
directories to the root directory of the webapp.  The designer gets the
/src/html/com/example/view directory.  This might not work for more
complicated package structures, but it works well for me.

   -- Scott

- project
   + doc
   + etc
   + lib
   - src
     - conf
         web.xml
     - html
       - com
         - example
           - view
             + css
             + images
             + js
     - java
       - com
         - example
           - config
           - dao
           - model
           - view



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Wicket-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wicket-user
Reply | Threaded
Open this post in threaded view
|

Re: How to separate java and html

Johan Compagner
use a resource folder in developtime
or what i would do is als use that html dir as a source folder so that
it is in youre classpath

On 1/2/06, Scott Sauyet <[hidden email]> wrote:

> Jesper Preuss wrote:
> > I would like to be able to separate the java code and the html layout.
> >
> > So I choose where the html lies for each html page. This is because I
> > would be able to let a html designer make the html and a programmer to
> > make the code.
> >
> > Is this possible or not?
>
> Juergen pointed out a way to add an arbitrary directory to search for
> markup.  That's often convenient, but I wanted something different.  I
> like having the HTML and Java in the same folder at run-time, but I like
> to develop with them separate so that I can at any time send a zip of
> the HTML folder (including all images, javascript, and css) to the
> designer.  Since my Wicket applications so far are quite simple, all the
> views are in a single Java package, which has made it quite simple.
>
> I use the folder layout below and in my build script copy the HTML to
> the same directory as the class files and copy the image, js, and css
> directories to the root directory of the webapp.  The designer gets the
> /src/html/com/example/view directory.  This might not work for more
> complicated package structures, but it works well for me.
>
>    -- Scott
>
> - project
>    + doc
>    + etc
>    + lib
>    - src
>      - conf
>          web.xml
>      - html
>        - com
>          - example
>            - view
>              + css
>              + images
>              + js
>      - java
>        - com
>          - example
>            - config
>            - dao
>            - model
>            - view
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> Wicket-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
<a href="http://ads.osdn.com/?ad_idv37&alloc_id865&op=click">http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Wicket-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wicket-user