I would strongly suggest using some form of HTML template - you basically
have a normal HTML file with tags that you replace in your servlet. If
these are in the form of comments ie <!--REPLACETHISVAL-->,
<!--TITLEHERE--> then you can edit the file in any html editor, and get it
looking the way you want - in fact other non programmers can edit it too!
This gives amazing flexibility, no recompiling required to change the
interface. The code to replace the tags simply loads the html file into
memory and does a search/replace on the tags you have defined. I haven't
looked at JSP yet, but I guess this may sound similar - difference is you
can choose the syntax. For all but the simplest web pages I reckon this is
a better way to go than the Element Construction Set, which although it
takes you one step away from raw HTML still ties your interface and code
together - unless I've misunderstood it.

I have used html templates in C++/Perl - for which are libraries to do
this for you + extra bells and whistles. Some libraries allow nested
templates, allowing you to easily generate tables etc. I haven't done any
servlet programming yet, but I think a package called JForms that may do
what you require (http://members.xoom.com/jforms/).

I'd be interested to here if there are other java template libraries, and
what their relative merits are.

barney

On Mon, 28 Jun 1999, jon * wrote:

> > My servlets are getting pretty messy, with HTML all over. What's a better
> > solution? I looked into JSP but I was not impressed with the syntax of that.
> > There must be a better way.
>
> Here is another solution...
>
> <http://java.apache.org/ecs/>
>
> -jon
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>

barney

Barney Dalton
[EMAIL PROTECTED]
Twist my arm http://telerobot.mech.uwa.edu.au

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to