<
jsp:useBean> tag creates bean instance if the specified bean is not found in the specified scope and set the values using <jsp:setProperty>.
How to retrieve the bean that has been created as i said above?
I have one form as follows:
<jsp:useBean id="usebean" class="com.example.UseBean"scope="request">
<jsp:setProperty name="usebean" property="*"/>
</jsp:useBean>
<form action="./getName">
Name<input type="text" name="name"/>
<input type="submit">
</form>
I'm trying to access the bean instance using request.getAttribute("usebean"); in my
servlet.. it is displaying null.
Can anybody explain what's wrong with above code?