A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
forum!
JavaRanch
»
Java Forums
»
Java
»
JSP
Author
Doubts in JSTL
Vasanthan Ramakrishnan
Greenhorn
Joined: Dec 16, 2007
Posts: 13
posted
Dec 27, 2007 21:39:00
0
hi
Doubts in JSTL
1.I need how to assign the JSTL varriable to xml tag attribute.
for example
In my TLD File
----------------
<tag>
<name>companytag</name>
<tag-class>bas.CompanyTag</tag-class>
<attribute>
<name>dbase</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
<type>
java.lang.String
</type>
</attribute>
<attribute>
<name>dbpass</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
<type>
java.lang.String
</type>
</attribute>
<attribute>
<name>dburl</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
<type>
java.lang.String
</type>
</attribute>
<attribute>
<name>pgm_sname</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
<type>
java.lang.String
</type>
</attribute>
<attribute>
<name>session</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
<type>
java.lang.String
</type>
</attribute>
</tag>
-------------------------
Html code
old code :
<%@ taglib uri="/ezerptags.tld" prefix="eztag" %>
.......
....
<eztag:companytag pgm_sname="<%= strpgm_name%>" dbase="<%= strd%>"
dbpass="<%= strp%>" dburl="<%= stru%>" session="<%= session%>" />
....
...
After modified in JSTL
<%@ taglib uri="/ezerptags.tld" prefix="eztag" %>
.......
....
<eztag:companytag pgm_sname="${pgm_name}" dbase="${strd}"
dbpass="${strp}" dburl="${stru}" session="${session}" />
.....
...
but its Not working. How to use this
the "eztag" and "companytag" are the customtag. these tages available in eztaglib.tld file. I am passing the value through XML Tag.
Please suggest me . how to use.
2.How to use ArrayLIst in JSTL
For example
IN Java scriplet code in
JSP
<%for(int i=0;i<alist.size();i++) {
String
str = String.valueOf(alist.get(i));
String str1 = String.valueOf(alist.get(i+1));
%>
<TD>STR - <%=str%> </TD>
<TD>STR1 - <%=str1%> </TD>
<% } %>
This code How to Use in JSTL.
thanks in advance
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56185
13
I like...
posted
Dec 27, 2007 23:24:00
0
Please do not post the same question(s) more than once.
[
Smart Questions
] [
JSP FAQ
] [
Books by Bear
] [
Bear's FrontMan
] [
About Bear
]
I agree. Here's the link:
http://zeroturnaround.com/jrebel
- it saves me about five hours per week
subject: Doubts in JSTL
Similar Threads
rtexprvalue-- what does it mean?
hi guys.. few doubts
Is this a valid tag definition ?
How to convert Java ArrayList code to JSTL
How to use JSTL varraible in to jsp
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter