adspace
How do I use a scriptlet to initialize a newly instantiated bean?
Answer Posted / Ilesh Kumar
<html><body>To initialize a newly instantiated bean using a scriptlet, create the bean instance within a scriptlet and set its properties using attribute values. Here's an example:<br><br>n<%nBean bean = new Bean();<br>bean.nsetProperty1(request.getParameter("property1"));<br>bean.nsetProperty2(request.getParameter("property2"));<br>%>n</body></html>
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers