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,040,783
  • 362
  • 3,548
  • 3,513
Java_Alert
  • 1,079
  • 6
  • 21
  • 49

0 Answers0