Servlet Do Post() help

Discussion in 'Java' started by Rose Girl, Jun 9, 2004.

  1. Rose Girl

    Rose Girl Guest

    Hi!

    Please guys i need some help on this.

    Is there a way to redirect from a servlets doPost() to another
    servlets doPost() method. i know to redirect to the doGet using a url
    like this.

    response.sendRedirect("/EcBugManager/servlet/bugmanager.bugmanager.gui.
    BugsheetPage?type="+bugsheettype+"&page="+page);

    My problem is i am passing some parameters, and i dont want to show
    these parameters in the explorer url. If there is a way to send those
    parameters as hidden values like from a html form page, that will
    solve my problem.

    Or is there any other way.

    - I need to have the explore bars, so getting rid of it is not a
    solution.


    thanks for your time
    Rose Girl
    Rose Girl, Jun 9, 2004
    #1
    1. Advertising

  2. Rose Girl

    bubba Guest

    "Rose Girl" <> wrote in message
    news:...
    > Hi!
    >
    > Please guys i need some help on this.
    >
    > Is there a way to redirect from a servlets doPost() to another
    > servlets doPost() method. i know to redirect to the doGet using a url
    > like this.
    >
    > response.sendRedirect("/EcBugManager/servlet/bugmanager.bugmanager.gui.
    > BugsheetPage?type="+bugsheettype+"&page="+page);
    >
    > My problem is i am passing some parameters, and i dont want to show
    > these parameters in the explorer url. If there is a way to send those
    > parameters as hidden values like from a html form page, that will
    > solve my problem.
    >
    > Or is there any other way.
    >
    > - I need to have the explore bars, so getting rid of it is not a
    > solution.
    >
    >
    > thanks for your time
    > Rose Girl


    Have a look at javax.servlet.ServletRequest.RequestDispatcher

    Its forward(path) method seems to be what you're after. It performs an
    internal redirect instead of the client-side redirect you're currently
    doing. You can access the dispatcher using request.getRequestDispatcher() or
    getServletContext().getRequestDispatcher()
    bubba, Jun 9, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andy Fish
    Replies:
    4
    Views:
    2,415
    Andy Fish
    Dec 17, 2003
  2. Sean Clarke
    Replies:
    1
    Views:
    1,892
    Sudsy
    Jan 7, 2004
  3. circuit_breaker
    Replies:
    2
    Views:
    1,996
    Jack Jia
    Apr 4, 2004
  4. Cormac O'Donnell

    HTTP/ Servlet/URL/ GET/ POST / HELP!!!!

    Cormac O'Donnell, Feb 16, 2005, in forum: Java
    Replies:
    2
    Views:
    766
    Wendy S
    Feb 17, 2005
  5. ppcguy
    Replies:
    1
    Views:
    605
    Andrea Desole
    Aug 8, 2005
Loading...

Share This Page