Hi Veronique,

Thank you very much, that's exactly what I want to know.
One more question, if I use <% toto.init(arg1,arg2);%>, then it will be
coded into the jspService function, right? But I only want it to be called
once, can I use <%! toto.init(arg1,arg2);%> instead?

Regards,
Mike

-----��l�l��-----
�H���: Veronique Dupierris <[EMAIL PROTECTED]>
�����: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
���: 2000�~9��26�� PM 04:45
�D��: Re: bean and jsp question


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

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