wood burning stoves 2.0*
The moose likes JSP and the fly likes Doubts in JSTL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Reply locked New topic
Author

Doubts in JSTL

Vasanthan Ramakrishnan
Greenhorn

Joined: Dec 16, 2007
Posts: 13
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: 61218
    
  66

Please do not post the same question(s) more than once.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Doubts in JSTL