Solved

isPostBack???

Posted on 2004-04-23
4
4,006 Views
Last Modified: 2012-08-13
Hai,

Is there any function similar to the isPostBack of ASP.Net in JSP?

Vikram.V
0
Comment
Question by:vikram_1982
  • 2
4 Comments
 
LVL 9

Expert Comment

by:Nick_72
Comment Utility
what does that function do?
0
 
LVL 7

Expert Comment

by:searlas
Comment Utility
Not exactly, but a reasonable replacement for
if isPostBack...

would be:
if ( "POST".equals(request.getMethod()) ) {
...
}
0
 
LVL 35

Expert Comment

by:TimYates
Comment Utility
0
 
LVL 9

Accepted Solution

by:
Nick_72 earned 20 total points
Comment Utility
ah ok, the IsPostBack property can be used to determine if the page is submitted to itself. In that case, you can use both getMethod and getRequestURL to determine if the call came from the same page:

Lets say your pageURL is "http://somesite.com/page.html"

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

    //you have a postback call :)
}
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Run the project 5 82
html form inside div 3 86
if statement not resolving in my code 5 41
instanceof  operator in java 26 70
Find out what Office 365 Transport Rules are, how they work and their limitations managing Office 365 signatures.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now