Solved

isPostBack???

Posted on 2004-04-23
4
4,068 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 20 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Suggested Solutions

Title # Comments Views Activity
error when compiling my project in eclipse luna 30 544
squirrelPlay java challenge 40 160
nested if has else if 13 101
glassfish admin console 1 52
Check out this step-by-step guide for asking an anonymous question on Experts Exchange.
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

739 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