Hi all,
Was just wondering if there was a way to call a constructor other than the
default one using <jsp:usebean...>
For example,
// Default constructor
MyBean() {
testVal = 0;
}
// Something different
MyBean(int i) {
testVal = i;
}
I understand I can do something like this:
<%
MyBean m = new MyBean(10);
%>
but is it possible to call the constructor and pass it an argument (the int
i) while using the <jsp:usebean...>tags instead of using a get and set with
the default constructor. This is a poor example because setTestVal(int i)
could be used easily, but for what I am working on, it would be much easier
to pass arguments to the constructor and also utilize the <jsp:usebean....>
tags so that our XML guys can work with it without too much instruction.
Thanks for the help
Jeff
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html