0

Is there any ASP.NET Page.IsPostback equivalent in JSP/Java? What I need to do is check whether this request is first time or is it result of post back. There are few Combo Boxes on JSP page and I need to load it only for the first time, (I am loading combo box's data from DB) not everytime page reloads. We reload the same page based on various input/selections etc. So I was looking for that type of method.

Hardrada
  • 728
  • 8
  • 19
Pradeep Simha
  • 17,683
  • 18
  • 56
  • 107

1 Answers1

1
if ( "POST".equalsIgnoreCase(request.getMethod()) &&
   ((request.getRemoteURL() != null && 
      request.getRemoteURL().toString().equalsIgnoreCase("http://yoursite.com")) {

    //postback call 
}

You may also see this question

Community
  • 1
  • 1
Habib
  • 219,104
  • 29
  • 407
  • 436