I am using same dpPost method for two different form data. I am not able to access request parameters for second form.

```
 protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

   if("schema".equals(session.getAttribute("which"))) {
             second_html();
             //call second page here
             }

             String btnClicked= request.getParameter("p2"); // This is getting null after submitting second_html()
       if("edit".equals(session.getAttribute("which"))){
     /*   process second page here after Submit on the second page
                   I am trying to access request.getParameter() but value is null                  here for the fields in the second page       */
                 second_html();
    }
   }
  first_html() {
   // have form and submit button
   session.setAttribute("which","schema");

}
second_html() {
 // have form and submit button
  <input type='text' name='p2' id='p2' size='3' >
 session.setAttribute("which","edit");
}

```

EDIT : My session getters are working fine. But the request.getParameter is not working.