title: How to make small alert notification in java
body: <p>I am working with Spring. I have one status button which changes the status of my program, i.e if I press that button my status become 1,2,3... The status gets stored in the database and program redirects to another page.</p>
  
  <p>I want to show the changed status notification at the redirected page for a small amount of time, i.e. if program redirected to another page than it should show an alert anywhere on that page and the alert will then hide after some time.</p>
  
  <p>Jsp button which changes the status:</p>
  
  <pre><code>&lt;button onclick="statusClicked(${caseInfo.id},2,'Final')"&gt;Mark as Final&lt;/button&gt;
  </code></pre>
  
  <p>This button will change status to 2.</p>
  
  <p>jQuery function:</p>
  
  <pre><code>function statusClicked(caseId,flowId,status){
      jConfirm("Are you sure to make the case '" + status + "'?", "Confirm Dialog", function(r) {
          if (r) {
              $("#statusCaseId").val(caseId);
              $("#statusFlowId").val(flowId);
              $("#statusCaseIdForm").submit();
          }
      });
  </code></pre>
  
  <p>After this <code>statusCaseIdForm</code> will get submitted along with value of <code>flowId</code></p>
  
  <p>There are many such buttons which changes the status of program </p>
  
  <p>Controller class code:</p>
  
  <pre><code>@RequestMapping(value = "/updateFlow", method = RequestMethod.POST)
  public ModelAndView updateFlowGet(@RequestParam Integer caseId,@RequestParam Integer flowId) {
      ClientService clientService = ServiceLocator.getClientService();
      MasterService masterService = ServiceLocator.getMasterService();
      CreditCase creditcase =clientService.getCase(caseId);
      WorkflowStatus workStatus=masterService.getworkflowStatus(flowId);
      creditcase.setStatusId(flowId);
      creditcase.setStatusName(workStatus.getName());
      masterService.addCreditCase(creditcase);
      ModelAndView model = new ModelAndView("redirect:/Dashboard");
      return model;
  }
  </code></pre>
  
  <p>Here i am updating my database with the status value And redirecting it to dashboard. I want to show the alert notification at the dashboard for a small period of time.</p>