0

I want to open https://stackoverflow.com/ in another tab but don't want to disturb current tab execution.

This is what I have tried -

try{
            ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
            externalContext.redirect("https://stackoverflow.com");
        } catch(Exception e){
            throw new FacesException("Redirection failed");
        }

currently, this code is opening this URL in the current tab only i.e. my current execution is going away.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Java_Alert
  • 1,159
  • 6
  • 24
  • 50

0 Answers0