If you want to use the useBean tag, your constructor should NOT have argument.
That's a part of the beans definition.... Of course you could find a workaround.
<jsp:useBean id="toto" class"..." scope="..."  >
<% toto.init(arg1, arg2); %>
</jsp:useBean>

    The code between <jsp:useBean..> and </jsp:useBean> is only executed when the
instance is created ....

Hope this help
Regards
Veronique

Mike Lai a écrit :

> Hi,
>
> I just start learning jsp and java bean, please give me some hint.
>
> My question is: can a bean has constructor that takes argument? If yes,
> how can I pass the argument using the <jsp:useBean> tag to do it?
> Thank you very much.
>
> Mike
>
> ===========================================================================
> 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

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