Hi Wallace,
I am not an expert in the field, but this is something I have seen in a book and might
help you:
Prior to JSP 2.0, to retrieve an object from a Map type object you would use
<%= ((Map) pageContext.findAttribute("myMap")).get("someKey") %>
the EL equivalent is
${myMap.someKey} or ${myMap["someKey"]} (if you want to use it at runtime use 2nd
form, meaning get the contents of someKey and not the word someKey itself as the index
of the Map)
I suppose what he means here you have to do a type cast and use the findAttribute()
and get() methods to get to the value of the key.
Another example, for beans this time:
In JSP < 2.0:
<jsp:getProperty name="myBean" property="myProperty" />
Using EL:
${myBean.myProperty}
Now for the arithmetic operations, I am not sure if JSP < 2.0 has any supporting
classes/tags to do it. Quite likely it does. If I was you I would look for those. If
not you might have to write your own beans for performing arithmetic required by your
project. Might be worth looking at tomcat mail list and documentation too about the
changes EL causes, and search google for migration info which could have more examples
of equivalence between the 2 versions of JSP.
I am not sure about the tld's in tomcat 4 since I am new to JSP myself and started off
with tomcat 5 for the obvious superiority of this version. Perhaps other members of
this forum can be of more help about that.
Manos
----- Original Message -----
From: Wallace
To: 'Tag Libraries Users List'
Sent: Tuesday, October 21, 2003 6:43 PM
Subject: RE: is this link correct?
Hi Manos,
I cannot change the provider because I am writing this jsp for a
friend and he is set on using this provider due to costs. I am stuck
with a tomcat 4 container and just wondering what I would have to do to
make it work for tomcat 4 instead. In jstl what is the syntax to extract
an html form's input data? Do I need to use <c:out>? And do I have to
create a web.xml to refer to tlds? Or can I just use a uri like I did
for tomcat 5? I did all my development and testing in tomcat 5, so JSP 2
syntax is all I know.
Wallace