Results 1 to 2 of 2
  1. #1
    systech44 is offline Member
    Join Date
    Nov 2009
    Posts
    3
    Rep Power
    0

    Question Redirect To Same Page

    Hello,

    I have been stuck by a serious situation. I wish to redirect my page to the same page. In my JSP page's form action property page I like to mention the same page name.

    We can do the same in PHP page like below.

    PHP syntax
    <form name="f" method="post" action="<?php echo $_SERVER["PHP_SELF"] ?>">
    ...............
    ...............
    </form>

    How is it possible to do the same in the JSP page ? I am using JSP with the Servlet in MVC framework.

    Please help. Thanks a lot in advance.

    Thanks & Regards.

  2. #2
    FON
    FON is offline Senior Member
    Join Date
    Dec 2009
    Location
    Belgrade, Serbia
    Posts
    368
    Rep Power
    5

    Default

    Use an empty action attribute on a form
    to submit that form to the current page.

    <form action="" method="post">

Similar Threads

  1. redirect to html page
    By simo_mon in forum Java Servlet
    Replies: 3
    Last Post: 02-12-2009, 05:18 PM
  2. Redirect page in web service
    By bluesheeva in forum Advanced Java
    Replies: 3
    Last Post: 02-03-2009, 11:56 PM
  3. Redirect Page in SOAP Message Handler
    By bluesheeva in forum Advanced Java
    Replies: 0
    Last Post: 12-28-2008, 12:43 PM
  4. redirect page within a java applet
    By paul in forum Java Applets
    Replies: 1
    Last Post: 08-07-2007, 05:11 AM
  5. How can I redirect in servlet?
    By Heather in forum Java Servlet
    Replies: 1
    Last Post: 07-14-2007, 05:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •