Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JSF form with URL action?

Is there any way to call a URL action within a <h:commandButton>, or for that matter a <h:form>? I'm trying to bypass my email's login page from my own website, so I'm using JSF beans to hold my login info in <h:inputSecret> tags so that I can simply click "Go to Email" and because I'm logged in to my own website, I could go straight to my inbox w/o logging in again

like image 594
Austin Avatar asked Nov 04 '22 18:11

Austin


1 Answers

Just use plain HTML <form> instead of JSF <h:form>.

<form action="http://example.com/mail" method="post">
    <input type="text" name="username" value="#{bean.username}" />
    <input type="password" name="password" value="#{bean.password}" />
    <input type="submit" value="Go to Email" />
</form>
like image 57
BalusC Avatar answered Nov 15 '22 10:11

BalusC