Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Simulate post method in a servlet

Reply
Thread Tools

Simulate post method in a servlet

 
 
delph
Guest
Posts: n/a
 
      05-13-2005
Hello,

I have a JSP with a form. The action of the form is a servlet. in my
method doPost of my servlet, i want to redirect the client to a file
..fcc with the post data of my JSP. How can i do that? (i tried with
httpurlconnection, i have the good post data but but my client is not
redirect).

Thanks,

Delphine

 
Reply With Quote
 
 
 
 
enrique
Guest
Posts: n/a
 
      05-13-2005
At the doPost method, you can do either a forward or a redirect, and do
one of a couple of things to maintain the post data:

* use querystring params, or
* store session-scope data, if you can access the data server-side by
the time the fcc is sent to the client ( I don't know what an FCC is )

I hope that helps.

 
Reply With Quote
 
 
 
 
delph
Guest
Posts: n/a
 
      05-13-2005
Thanks for your reply.

A fcc file is a file that contains directives used when executing a
post operation on the fcc file. the directives are in the post data of
a http request, so i can't use the querystring params. this type of
file is used by SiteMinder.

how do you store session-scope data?

 
Reply With Quote
 
Andrea Desole
Guest
Posts: n/a
 
      05-13-2005
Use forward. The information in the request will be retained, and the
request will be sent to a new page. The disavantages are that the
destination page must be in your application, and you will not see the
destination url in the browser.
If that is not good for you, you can only build a new request copying
all the parameters from the old request, which can be a bit annoying.

delph wrote:
> Hello,
>
> I have a JSP with a form. The action of the form is a servlet. in my
> method doPost of my servlet, i want to redirect the client to a file
> .fcc with the post data of my JSP. How can i do that? (i tried with
> httpurlconnection, i have the good post data but but my client is not
> redirect).
>
> Thanks,
>
> Delphine
>

 
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
Init method in servlet freezing the servlet Mitch Java 2 03-13-2006 01:55 AM
Simulate post at webpage dast C++ 2 09-15-2005 09:59 AM
Servlet question(Tomcat, web.xml, servlet-class, servlet-name) circuit_breaker Java 2 04-04-2004 03:26 AM
How to simulate a form post? Al Cadalzo ASP .Net 4 02-17-2004 05:11 PM
Tomcat: POST from one servlet or internal class to another servlet Sean Clarke Java 1 01-07-2004 02:22 PM



Advertisments