Hello guys !!!
I have found an example in Weblogic 5.1 of JSP Tag Libraries. Take a
look at it:
<sql:connection pool_name="demoPool">
<% String query = "SELECT * FROM emp"; %>
<p> Making a query:
<font face="Courier New" size=-1 color=navy><%= query %></font>
<sql:query id="employees" sql="<%= query %>" >
<p> Here are the results...
<p><blockquote>
<table border=1>
<tr bgcolor=#DDDDFF>
<th>Employee Name</th>
<th>Job Role</th>
</tr>
<sql:results from_query="employees">
<tr>
<td><%= employees.getString("ename") %></td>
<td><%= employees.getString("job") %></td>
</tr>
</sql:results>
</table>
</blockquote>
</sql:query>
</sql:connection>
They use three custom tags, the first opens a connection with a
database, the second executes a query and the third goes along the query
results. I'm trying to do something like this, but when I access the
variable 'employess' at the third step, I obtain a compilation error
because this variable wasn't defined previously, although it has a value
in the session.
How can I access this variable from the JSP without declaring it in the
JSP like they do in the example? Is there any way of declare it inside
the tag handlers?
I will be very pleased with all kind of help.
JP.-
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets