Is it possible to perform a forward into a new window?

Posted by smayers81 on Stack Overflow See other posts from Stack Overflow or by smayers81
Published on 2010-04-01T14:59:36Z Indexed on 2010/04/01 15:03 UTC
Read the original article Hit count: 221

Filed under:
|
|

We are using ICEFaces 1.8 and I would like to perform a forward to a new URL, but want it to open in a new window. We are currently able to perform a redirect to a new window as:

public static void redirectToUrl(String urlPath) {
    if (urlPath != null) {
        try {
            final String url = FacesUtil.getContextPath() + urlPath;

            final StringBuffer jsCommand = new StringBuffer();
            jsCommand.append("window.document.location.href='").append(url).append("';");

            JavascriptContext.addJavascriptCall(FacesContext.getCurrentInstance(), jsCommand.toString());
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}

But is a forward possible using a similar approach?

© Stack Overflow or respective owner

Related posts about httprequest

Related posts about forwarding