Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Post Parameters in JSF

 
Cory Max
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Cory Max
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic