Hi,
I'm currently doing a 'pure' Servlet project and was wondering about client
side validation. . Could you please give a little more detail around:
"We validated on the client side (size, type, not null) using the table's
meta-data to generate the html."
Do you mean you generated JavaScript based on the table's meta-data and
dynamically wrote that into the document?
More generally, what have people done with integrating html/servlet code? Is
caching some pre-written templates with data placeholders and manipulating
these at runtime an acceptable approach? I was thinking of having my product
classes implement a 'ProductDisplay' interface such that they know how to
render their data with respect to the data placeholders. Something like:
[element from pre-read/cached file maniulated at runtime]
<table>
<PRODUCT class="nameOfProduct" mode="simple">
<tr>
<td><PRODUCT_TITLE></td>
</tr>
<tr>
<td><PRODUCT_IMAGE linkToDetail="yes"></td>
</tr>
</PRODUCT>
</table>
I'd really like to abstract data/process/display (not keen on using JSP for
this reason) and this is as good as I can think of.
Perhaps too general but thanks anyway.
Regards,
Derek
----- Original Message -----
From: "Tim Panton-Westpoint Ltd" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 10, 2001 8:36 PM
Subject: Re: Server Side validation
> A while back we did a 'pure' servlet
> project (no jsp, no xml) writing
> direct to an oracle db.
> We validated on the client side
> (size, type, not null) using
> the table's meta-data to generate
> the html. We then inforced the
> bussiness rules (they were simple)
> in triggers (via jdbc) in the servlet.
> We had
> a layer that translated oracle
> error numbers (in thrown exceptions) into suitable error messages, by
looking at which
> fields in could throw that exception
> (again from the meta-data)
>
> I'm not sure I'd do it exactly the
> same way again, but it works
> ok if the bussiness logic is simple.
> In that case there was a pretty
> simple mapping between html pages
> and database tables and views.
>
> This time around I'd probably use
> xsl to convert the error numbers
> to relevant text.
> Tim.
>
> http://www.westpoint.ltd.uk/
>
> Internet reconnaissance services.
>
>
___________________________________________________________________________
> 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
___________________________________________________________________________
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