How do I share session between jsp and servlets

Solution for How do I share session between jsp and servlets
is Given Below:

I have two jsp form with each servlet, I want to know how to pass an object from servlet to jsp page to a Servlet. Specifically, I have a form element whose action tag references a servlet. On form submission, I want to embed an object in session object so that it can be dereferenced by servlet.

Here is the servlet which i want to share session object( Reservation object) to “CustomerFormPage.jsp”

    try {
            String date1=request.getParameter("departureDate");
            String comefrom=request.getParameter("comeFrom");
            String cometo=request.getParameter("comeTo");
            String baggage=request.getParameter("baggageComp");
                ContractFormChecker b= new ContractFormChecker();
                //return current request associated with request
                Reservation res=new Reservation();
                if(b.check(res)==null) {
                HttpSession session=request.getSession();
                session.setAttribute("Reservation", res);
                request.setAttribute("Reservation", res);

Here i set session “Reservation” by setAtribute to next page “CustomerFormPage.jsp”


      <form action="toCustomerFormServlet" method="post">
      <input type="hidden" name="res" value="${sessionScope.Reservation}" />
        <table style="with: 50%">
                <td><input type="text" name="customer_name"
    placeholder="ex" value="">
                <td><input type="text" name="phone_num"
    placeholder="ex" value="">
        <a href="ContractFormPage.jsp"><input type="button" value="back" /></a>
        <input type="submit" value="予約" />
        <div align="center" style="color:red;">
        <c:out value="${requestScope.error}"/>
        <p> <span style="color: #FF0000">${sessionScope.Reservation}</span></p>

i checked the session in ${sessionScope.Reservation}, it produce reservation object from session before and i try to set session in the value hidden input type as string for next toCustomerFormServlet

   <input type="hidden" name="res" value="${sessionScope.Reservation}" />


    try {
            String Customer_name=request.getParameter("customer_name");
            String Customer_phone_no=request.getParameter("customer_phone_no");
                String a=request.getParameter("res");
                HttpSession session=request.getSession();
                //return current request associated with request
                Reservation rsv=new Reservation();
                rsv ab=(Reservation) session.getAttribute(request.getParameter("res"));
                //here produce null in ab , why?

                CustomerFormChecker b= new CustomerFormChecker();

here I got null when i tried to get session from before in rsv ab . how can i fix this?