JSTL question

  • Thread starter slippymississippi
  • Start date
S

slippymississippi

I am looking at the LinesFromReader class at:

http://mail-archives.apache.org/mod...<[email protected]>

or:

http://tinyurl.com/7nn8a


I'm a bit confused by the use "reader" in all of the attribute names,
so I was trying to substitute out the names for something generic to
see which attributes were referring to which objects. The original
JSTL is:

<c:import varReader="reader" url="...">
<jsp:useBean id="readerLines" class="com.dotech.io.LinesFromReader"/>
<c:set target="${readerLines}" property="reader" value="${reader}"/>
<c:forEach var="line" items="${readerLines.lines}">
...
</c:forEach>
</c:import>

Trying to substitute generic names, I get:

<c:import varReader="x" url="...">
<jsp:useBean id="y" class="com.dotech.io.LinesFromReader"/>
<c:set target="${y}" property="reader" value="${x}"/>
<c:forEach var="line" items="${y.lines}">
...
</c:forEach>
</c:import>

Is this correct? If so, does y.lines automatically generate a call to
LinesFromReader.getLines()? Does this happen because of the bean
nature of the LinesFromReader class?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

jsp:include c:import question 2
JSTL concatenate 2
Comparing dates using JSTL 0
JSTL on Tomcat 5.0 0
How to process string value after 'el' processing 5
JSTL error 1
JSTL newbie question 3
JSTL accessing Map 2

Members online

Forum statistics

Threads
473,968
Messages
2,570,154
Members
46,701
Latest member
XavierQ83

Latest Threads

Top