sidhartha75
Programmer
Thanx a bunch...I tried that but It doesnot work either. I guess the problem lies in the setAttribute method. When I enter a blank last name (pls refer code above) it should set the attribute for "errmsg". but when I printed the request.getAttribute("errmsg" it displays it as NULL when I tried outputting it on the fly through the servlet.
Also once the attribute is assigned the JSP should display error message with the setAttributes for the errmsg to the user.
The JSP code is as follows
<%
String msg = (String) request.getAttribute("errMsg"
%>
<html>
<B><%=msg%></B></BR></BR>
Please use the back button on your browser to return to the previous page(s) and try again.
</html>
So if you look at the code above entering a blank Last Name should call set the attribute and call the sendError method which in turn forwards the request to JSP.
But now when I submit the form with a blank Last Name instead of JSP page being exceuted it displays a blank page.
Can you help me further
Wishes and Thanks
Sidhartha
Also once the attribute is assigned the JSP should display error message with the setAttributes for the errmsg to the user.
The JSP code is as follows
<%
String msg = (String) request.getAttribute("errMsg"
%>
<html>
<B><%=msg%></B></BR></BR>
Please use the back button on your browser to return to the previous page(s) and try again.
</html>
So if you look at the code above entering a blank Last Name should call set the attribute and call the sendError method which in turn forwards the request to JSP.
But now when I submit the form with a blank Last Name instead of JSP page being exceuted it displays a blank page.
Can you help me further
Wishes and Thanks
Sidhartha