This is a discussion on Accessing Javabean data from JSP custom tag - Weblogic ; Hi ! I'm very new to the JSP world and I'm currently working on a small framework for a new application. I've been processing tons of information on JSP for the last few weeks discussing best practices and the MVC ...
I'm very new to the JSP world and I'm currently working on a small
framework for a new application.
I've been processing tons of information on JSP for the last few weeks
discussing best practices and the MVC paradigm but I still can't figure
out some few simple things and can't get anything concrete to work !
What I want is to have a set of Javabeans to perform all data access
with the database. Those beans are stored in memory (right ?) for
access by the JSP which displays the information.
Alright! When I want an input field to display the value of a string,
that's pretty simple ! But now, I want to create a custom JSP tag that
will retreive an entire resultset and display it (in a table, for
I think the only thing that can be passed to the JSP tag is a string
attribute, right ? (Can't pass it the actual resultset). So the way I
see it, the MVC way to adress this issue would be to inform the JSP tag
of where to locate the resultset (ie the Javabean in memory) and to
have it accessing a method from that been to retreive the displayable
Am I missing something or is this making sense ?
In the latter case, how can I access the Javabean method (getter) from
the JSP custom tag ? Could anyone provide me with some code examples ?
Also, what should be the format of this data ? (I think it is better
to close the JDBC ResultSet after processing, before forwarding control
to the jsp, right ?) So what do I put the data in ? What kind of
object will my custom tag receive from the bean and read the data from
I'll greatly appreciate any comments, www links or examples on this