sorry for replying late. was not online for few days. anyway.
i tried making the following changes.
i just added try catch block like this
now i'm not getting error. and it is calculating avg also.
I'm a new to JSP. i read that you need not do exception handling in JSP. it is automatic. i mean it will automatically have exception handling in JSP equivalent servelt.
So first is it compulsory to do in exception handling in JSP also.
second. Though it is not giving any errors . it is not inserting the data in table can you say why?
raj kiyare wrote:So do you mean when I write java scriplets i need to write exception handling explicitly.?
No. If you're writing Java code then you need to take care of exception handling, especially for JDBC code. And just because you put that Java code into a scriptlet, that doesn't magically make the exception handling requirement go away.