Re: "`javascript' is not supported as a JSP scripting language."
Mattias Jiderhamn <[email protected]> Thu, 11 May 2006 09:39:04 +0200
| Newsgroups | gmane.text.xml.resin.user |
|---|---|
| Message-ID | <[email protected]> |
JavaJosh wrote: >Am I the only one who thinks that it makes sense to use the same >javascript for doing form validation on the server as on the client? Even though it may make sense so use the same validation code, I would not want to put that code in the view/JSP file. Also, sometimes you want to make more thorough validation on the server (i.e. database lookup of values rather than just type checking). >(And actually, come to think of it this doesn't bother me all that >much for my purpose, since it would actually be better for me to be >able to explicitly call the JavaScript engine from Java - e.g. >something like a custom tag: > ><jj:javascript "/script.js" "function-name" "string arguments >possibly EL, possibly a DOM reference"/> You may be able to achieve this with Rhino. >Scott Ferguson wrote: >>One of the main problems with server side javascript was that no >>one really developed an extensive server-side library. Even stuff >>like file access is missing (or was last time I checked.) > >This is changing with the rise of 'AJAX' websites. ... My goal is to >execute the same form validation code on the client and on the server. The point with AJAX is that you call the server code (Java) from the client side, rather than using the client side code (JavaScript) on the server.