I want to pass value to servlet but I keep get null value.
<jsp:useBean id="Helper" class="model.Registration" scope="request"/>
<form action="/Project/Registration" method="post" enctype="multipart/form-data">
<input type="text" size="20" name="name" value="<%=Helper.getName()%>">
<input type="submit">
</form>
protected void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
Registrationh2 = (Registration) request.getAttribute("Helper");
if(h2!=null){
System. out.println(h2.getName());
}
else
System. out.println("NULL");
}
Is there anything wrong with my code?