but what you've done is added attributes to the request and then you are
retrieving parameters from your that request. You should either add
parameters to the request leave the second servlet unchanged or change the
code in the first servlet to:
public class DispatchTest extends HttpServlet {
public void doPost(HttpServletRequest req, HttpServletResponse res)
throws
IOException, ServletException {
doGet(req,res);
}
public void doGet(HttpServletRequest req,
HttpServletResponse res) throws
IOException, ServletException {
RequestDispatcher dispatcher
getServletContext().getRequestDispatcher("ReceiverTest");
String a = "";
a = req.getParameter("name");
res.setContentType("text/html");
if(a.equalsIgnoreCase("bala")) {
if(dispatcher != null) {
req.setParameter("age","25");
req.setParameter("edu","UG");
dispatcher.forward(req, res);
etc etc