How do I use a scriptlet to initialize a newly instantiated bean?
Answer / 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 |
What are the life-cycle methods for a jsp?
What is custom tag library?
Explain JSP directives.
What is the difference between hide comment and output comment?
What are the types of directives in jsp?
What is a expression?
What is the use of?
Tell us about the jsp life cycle methods.
what is the difference between jsp and servlets ?
what is the extended star schema
What is the need of jsp?
What is jsp in html?