tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Helios Alonso <halo...@atg.com.uy>
Subject Re: When are tags executed?
Date Wed, 11 Aug 2004 18:12:48 GMT
Weird idea (but it tries to Keep It Simple):

replace the Java Applet with a HTTP request, it is:

when your Javascript wants to validate something, create a window (small, 
invisible, 0 pixel frame, or something) with a URL requesting validation like:

www.server.com/validating/data?value1=xxx&value2=xxx&value3=xxx

(or simple with all the form data, something like submiting the form to 
another page:

form1.action = "validator";
form1.target = "validationWindow";
form1.submit();

// don't take this code very seriously, I don't know if I can change the 
"action" of a form but it would be a good try
)

Well, you have to program a servlet that validates the params and writes a 
result.

The JavaScript can validate the result evaluating 
validationWindow.document.body.

It's a pretty good change but it has two advantages:

1) eliminates the need for applet execution in the client side
2) only make changes from validation javascript code, not the rest of the 
page and the system

Tell me how does it sounds to you...

At 10:41 11/08/2004 -0400, you wrote:
>Can someone explain when tags are executed? Namely, custom tags and the 
><sql> tag.
>
>The problem is we currently have a web app that has a jsp's JavaScript 
>communicating with an applet that can query a database. It allows us to do 
>real-time validation against database values. We know it is bad design. 
>It's an older system and already have vowed not to use it in future 
>projects. However, testing with XP service pack 2 is freezing the applet. 
>So we are trying to come up with some alternatives without having to 
>redesign and rewrite portions of existing apps. Someone came up with the 
>idea of using the <sql> tag, but I thought that ran on the server before 
>the response was sent to the browser, thus it wouldn't work for real-time 
>validation. Would a custom tag work? Or are those run on the server as well?
>
>Thanks,
>Karl
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: taglibs-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Mime
View raw message