This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes Pass hidden parameters to another URL from server side. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Pass hidden parameters to another URL from server side." Watch "Pass hidden parameters to another URL from server side." New topic
Author

Pass hidden parameters to another URL from server side.

Shyam Hai
Ranch Hand

Joined: Feb 04, 2009
Posts: 68


Hai

I want to pass hidden parameters to another URL from server side.
So i gave like this.



In confirm.jsp have some hidden parameters.
here i can reach the url. but parameters are not going.

how can i send hidden parameters from server side.

Please give the solution.
Thanks.

Ragav
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30075
    
149

It sounds like you have hidden values on the form submitted with confirm.jsp and you want to send them to the server at 198.162.16.10. You can't. You're options are to submit them in the URL as a GET or have the user submit another form and use a POST. Let's look at the flow as to why:

1) User submits confirm.jsp
2) Hidden parameters are in the HttpServletRequest to your server
3) You do stuff on your server
4) Struts forwards to the other server
5) The user sees the aspx page on the other server

Since the aspx page is on another server, it doesn't have access to your HttpServletRequest.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Shyam Hai
Ranch Hand

Joined: Feb 04, 2009
Posts: 68
Hai Jeanne

Thanks.
how to do that.
can you give example code for that.

Ragav
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Pass hidden parameters to another URL from server side.
 
Similar Threads
encoding URL in (href element of) JSP without scriptlets
forward request url from server side
forward the request url from struts config with hidden parameters
request.getParameter is null
Pass parameters between 2 EARs.