Originally posted by Chris Pat:
I thought the entire idea about jstl was to use it as a preprocessor and to permit the output of the tag to be dynamically computed and serve as the static input value for a struts tag which then get computed and then javascript. Where is that wrong, I would like to clearly understand this.
All I can tell you is that your statement above is in fact wrong. You can use a JSTL tag as an attribute of a plain HTML tag because plain HTML tags require no preprocessing (The goal of a
JSP is to produce plain HTML). However, both JSTL tags and Struts tags are custom tags and both
do require preprocessing to produce plain HTML. It's a hard and fast rule that one custom tag cannot be substituted as the attribute of another custom tag.
Originally posted by Chris Pat:
How can I set the ActionForm bean value without access to an expression that will pull out the serverPort?
The best place to set the bean value is in an Action class that forwards to this JSP. If you set the value in the JSP and then have to redisplay the JSP because of a validation error, it will revert to the value you set rather than the value the user entered. However, if you insist on setting it in the JSP, you can do it like this:
Originally posted by Chris Pat:
Is the only way to populate the value with struts-el?
If your web application were a
Servlet version 2.4 application you could use JSTL expressions anywhere in the JSP including in attributes of Struts tags, However, since you're using
Tomcat 5.0, it doesn't support Servlet 2.4. In a Servlet 2.3 application, your only options are to use a scriptlet (e.g <%= somevalue%>) or to use the Struts-el tags.
Originally posted by Chris Pat:
Also where can I dn the struts-el jars?
There's only one struts-el jar file and you've already downloaded it when you downloaded Struts. Look in the "contrib" folder of the downloaded materials.
[ July 11, 2008: Message edited by: Merrill Higginson ]