title: How to change the text of a label when a page is reloaded in JSP page?
body: <p>I am new to servlets. I have a servlet that i update the database in it. After clicking submit button, i want to show a message that tells whether update is succesfull or not. For this i am planning to put a label but label tag has no property like value, visible etc. How can i do that? Here is my code of servlet:</p>
  
  <pre><code>protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
      //System.out.println("editservlet");
  
      try
      {
          connect();
          int result=-1;
          PreparedStatement checkDB = (PreparedStatement) con.prepareStatement(
          "UPDATE users set username=?,password=?,name=?,surname=?,phone=?,address=?," +
          "email=? where username=?");
          checkDB.setString(8,request.getParameter("tUserName"));
          checkDB.setString(1,request.getParameter("tUserName"));
          checkDB.setString(2,request.getParameter("tPassword"));
          checkDB.setString(3,request.getParameter("tName"));
          checkDB.setString(4,request.getParameter("tSurName"));
          checkDB.setString(5,request.getParameter("tPhone"));
          checkDB.setString(6,request.getParameter("tAddress"));
          checkDB.setString(7,request.getParameter("tEmail"));
          result= checkDB.executeUpdate();
                      if(result&gt;0)
              //SHOW THE MESSAGE THAT TELLS UPDATE SUCCESFUL
  
      }
      catch(Exception e)
      {
          e.printStackTrace();
                      //SHOW THE MESSAGE THAT UPDATE UNSUCCESFUL
      }
  
  
  }
  </code></pre>
  
  <p>Can anyone help me with this? Thanks</p>