wood burning stoves 2.0*
The moose likes JSF and the fly likes Post Parameters in JSF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Post Parameters in JSF" Watch "Post Parameters in JSF" New topic
Author

Post Parameters in JSF

Cory Max
Ranch Hand

Joined: Jul 20, 2005
Posts: 83
Hi Everyone,

I am new to JSF and having some troubles with parameters. Here is what I am trying to do: Someone has logged in to my site (site a). I have their username and password to another site (site b). I would like them to click on to a link in my site and get passed through directly to the next site without entering their username and password. This would work:

<form name="someform"
action="http://someurl/somepage.asp?Param1=asdf&Param2=fdsa" method="POST">
<input type="hidden" name="HTTP_REFERRER" value="somejsp.jsp"/>
<input type="hidden" name="UserID" value="#{user.name}"/>
<input type="hidden" name="Password" value="#{user.name}"/>
<input type="submit"/>
</form>

That being said, I dont want to have their username and passwords in hidden fields. I never want them to be sent the browser. Ideally, I would like for them to click a link, have that link go through the jsf controller, find a method to construct the url and the post parameters, then open a new window containing the page for the external site. Sure hope this made sense to someone. Please help :-)

Cheers,

Cory


There are only 10 types of people in this world... Those who understand binary and those who don't.
Cory Max
Ranch Hand

Joined: Jul 20, 2005
Posts: 83
Oops, that wouldnt work. This would though

<html>
<form name="scfrm" action="http://someurl.com/somepage.asp?param1=asdf¶m2=fdsa" method="POST">
<input type="hidden" name="UserID" value="theusername"/>
<input type="hidden" name="Password" value="thepass"/>
<input type="submit"/>
</form>
</html>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Post Parameters in JSF
 
Similar Threads
how to add data in request object and pass it to next page?
Redirect
Preventing password alerts
How to send a information to a form?
Redirect & https