When you first request the jsp file
1. jsp converted to servlet and in service attribute jyothi placed.
2. and in response html form sent.
3. your request ends here.(that means your request,response objects gone).
secondly when user submits the form
1. control reaches servlet
2. tries to find jyothi in request scope.
finally gives up return null.
[ May 11, 2007: Message edited by: Srinivasan thoyyeti ]
You are using a java1.5 feature called unboxing, which converts an Integer into an int.
But you are trying to convert null into an int, which fails.
It would work with Integer i = (Integer)request.getAttribute("jothi");
Maybe you'd better use SDK1.4 to practice for this exam.