JSF - Open a new tab from page and supply basic http authentication

Multi tool use
Multi tool use
The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


JSF - Open a new tab from page and supply basic http authentication



I have a scenario where I have button which need to open up a new tab and go to an external site. This site require sbasic HTTP authentication. So I need to supply the credntials but am unsure how.



Usually I would do something like this inside of my method (which a command button would invoke) to redirect to a new page:


ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
externalContext.redirect("http://stackoverflow.com");



Which of course works, but I can't find if using ExternalContext I can then send Basic Authentication credentials in the header?









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

B6R kJEme443O9WYjwU1ERjsO0IRChP330 2JfZpzMQ e1dD72X5Q3R gjF9A6crQHobMW9Zhveds
2 ABd3Y,14pRP1j6vI594S5BU2XNr4L sHQ62HvGXifvB,WHnt

Popular posts from this blog

Keycloak server returning user_not_found error when user is already imported with LDAP

PHP parse/syntax errors; and how to solve them?

Using generate_series in ecto and passing a value