code: public void actionPreview() throws IOException, JspException {
  
          try {
              // save content of the editor to the temporary file
              performSaveContent(getParamElementname(), getElementLocale());
          } catch (CmsException e) {
              // show error page
              showErrorPage(this, e);
          }
  
          // redirect to the temporary file with current active element language
          String param = "?" + org.opencms.i18n.CmsLocaleManager.PARAMETER_LOCALE + "=" + getParamElementlanguage();
          sendCmsRedirect(getParamTempfile() + param);
      }
docs: Performs the preview page action in a new browser window.<p>
  
  @throws IOException if redirect fails
  @throws JspException if inclusion of error page fails