Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

isPostBack???

Posted on 2004-04-23
4
Medium Priority
?
4,139 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 9

Expert Comment

by:Nick_72
ID: 10898940
what does that function do?
0
 
LVL 7

Expert Comment

by:searlas
ID: 10900245
Not exactly, but a reasonable replacement for
if isPostBack...

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

Expert Comment

by:TimYates
ID: 10900336
0
 
LVL 9

Accepted Solution

by:
Nick_72 earned 80 total points
ID: 10900414
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
The main intent of this article is to make you aware of ‘Exchange fail to mount’ error, its effects, causes, and solution.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

670 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