Controlling the output of servlet( very urgent and important)

Discussions

Web tier: servlets, JSP, Web frameworks: Controlling the output of servlet( very urgent and important)


  1.  hello friends,
     I have a query please reply as early in a servlet

     I have code

      out.println(" Wait records r updating");
      {
           some code for updating a records;
      }
      redirect to next page and show by using send redirect
      out.println("records updated");

      now i want show "Wait records r updating" for the time period it takes to update the records.
     then redirect.
     How it is possible please reply as early.
     thanks in advance
    bye bye
    regards
    - mohan
     
  2. mohan,

    i only have a fair idea baout it but i will try.

    you must be update the records using executeUpdate() method
    there is a method whose output is boolean.

    boolean b = stmt.execute(sql);
    Use the condn. for true/false in if( condn.)

    say if the records get updated then it is true and the action performed should be the redirecting of the page.