Buddy you are using a very bad programming style. First of all, you said that your b.jsp is doing total/average but I don't see anything like that there. Secondly, If you redirect the user from b.jsp to c.jsp, then the values of variables in b.jsp will not be preserved. And doing business logic in JSPs is not a good practice.
You should use a
servlet instead of b.jsp. That servlet will calculate the total and average and then forward the request using RequestDispatcher to c.jsp. That servlet will also store the total and average as request attributes for c.jsp to retrieve and display. Please try to do this and ask any confusions...