Hello,

I would like to access methods from a class that I've already instantiated
from my JSP.  The thought is that, I've made a database call and poplulated
all of the class variables and want to access them via the classes' get
methods from within the JSP.  After the class has been instantiated I am
calling the JSP.

I have the following JSP that works fine, but it creates a new "testObject"
and I don't have access to the data from my already instantiated testObject.

Any thoughts?  Does this even make sense to do?

- Ed



<%@ page import="testObject" %>
<jsp:useBean id="test" class="testObject" scope="application" />


<% session.putValue("name", "Happy Gilmore"); %>
The current date is <%= new java.util.Date() %>
The Session Name is: <%= session.getValue("name") %>
The Java HashTable name is: <%= request.getAttribute("name") %>
Object stuff is: <%= request.getAttribute("object") %>
Direct call to object: <%= test.getName() %>

===========================================================================
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

Reply via email to