<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?
In the above question, there is no bean instance in request scope.
So, the container will create one and populates the values..right!!
when the user enters the name and submits, the request will come to my servlet..
i'm trying access the container created bean as follows :
gopakumar king wrote:Then how does the container assigns the properties of the bean with the values entered in the html componentss?
mean to say : <jsp:setProperty name="usebean" property= "*"/>
You are confusing the request whose response sends the HTML form to the page, with the request that is generated when the form is submitted. They are different and distinct requests and any request-scoped beans created in the first are not available in the second.
You should be submitting the form to a servlet that gathers the data using Java code.
The property= "*" format for useBean is a hold-over from 10 years ago when it was thought to be ok to submit a form to a JSP. That is no longer considered an acceptable practice.