Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Servlet Do Post() help

Reply
Thread Tools

Servlet Do Post() help

 
 
Rose Girl
Guest
Posts: n/a
 
      06-09-2004
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
 
Reply With Quote
 
 
 
 
bubba
Guest
Posts: n/a
 
      06-09-2004

"Rose Girl" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> 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()


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
servlet help - redirecting from within a framed servlet ppcguy Java 1 08-08-2005 03:03 PM
Offending class: javax/servlet/Servlet.class chamikara Java 1 06-19-2004 05:42 AM
Servlet question(Tomcat, web.xml, servlet-class, servlet-name) circuit_breaker Java 2 04-04-2004 03:26 AM
Tomcat: POST from one servlet or internal class to another servlet Sean Clarke Java 1 01-07-2004 02:22 PM
how to get my servlet configuration before the servlet is initialised Andy Fish Java 4 12-17-2003 09:47 PM



Advertisments