Tabnine Logo
JspWriter.clear
Code IndexAdd Tabnine to your IDE (free)

How to use
clear
method
in
javax.servlet.jsp.JspWriter

Best Java code snippets using javax.servlet.jsp.JspWriter.clear (Showing top 20 results out of 477)

origin: spring-projects/spring-framework

@Override
public void clear() throws IOException {
  getEnclosingWriter().clear();
}
origin: spring-projects/spring-framework

@Override
public void clear() throws IOException {
  getEnclosingWriter().clear();
}
origin: com.liferay.faces/liferay-faces-util

@Override
public void clear() throws IOException {
  stringJspWriter.clear();
}
origin: liferay/liferay-faces

@Override
public void clear() throws IOException {
  stringJspWriter.clear();
}
origin: org.jasig.portal/uPortal-web

@Override
public void resetBuffer() {
  try {
    this.jspWriter.clear();
  } catch (IOException e) {
    throw new IllegalStateException("Response has already been committed", e);
  }
}
origin: com.caucho/resin

final public void clear()
{
 try {
  _jspWriter.clear();
 } catch (IOException e) {
  log.log(Level.FINE, e.toString(), e);
 }
}
origin: org.apache.velocity.tools/velocity-tools-view-jsp

@Override
public void clear() throws IOException
{
  getEnclosingWriter().clear();
}
origin: com.liferay.faces/liferay-faces-util

@Override
public void clear() throws IOException {
  getWrapped().clear();
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-test

@Override
public void clear() throws IOException {
  getEnclosingWriter().clear();
}
origin: liferay/liferay-faces

@Override
public void clear() throws IOException {
  getWrapped().clear();
}
origin: apache/servicemix-bundles

@Override
public void clear() throws IOException {
  getEnclosingWriter().clear();
}
origin: StripesFramework/stripes

/**
 * Calls {@link JspWriter#clear()} on the wrapped JSP writer.
 *
 * @throws IOException
 */
public void clear() throws IOException {
  Writer out = getOut();
  if (out instanceof JspWriter) {
    ((JspWriter) out).clear();
  } else if (out instanceof StringWriter) {
    ((StringWriter) out).getBuffer().setLength(0);
  } else {
    throw new StripesRuntimeException("How did I get a writer of type "
        + out.getClass().getName() + "??");
  }
}
origin: net.sourceforge.stripes/stripes

/**
 * Calls {@link JspWriter#clear()} on the wrapped JSP writer.
 * 
 * @throws IOException
 */
public void clear() throws IOException {
  Writer out = getOut();
  if (out instanceof JspWriter) {
    ((JspWriter) out).clear();
  }
  else if (out instanceof StringWriter) {
    ((StringWriter) out).getBuffer().setLength(0);
  }
  else {
    throw new StripesRuntimeException("How did I get a writer of type "
        + out.getClass().getName() + "??");
  }
}
origin: org.seasar.teeda/teeda-extension

public void forward(String relativePath) throws ServletException,
    IOException {
  try {
    out.clear();
  } catch (IOException ex) {
    IllegalStateException ise = new IllegalStateException(ex.toString());
    ise.initCause(ex);
    throw ise;
  }
  while (response instanceof ServletResponseWrapperInclude) {
    response = ((ServletResponseWrapperInclude) response).getResponse();
  }
  String path = getContextRelativePath(relativePath);
  String includeUri = (String) request
      .getAttribute(JspConstants.INCLUDE_SERVLET_PATH);
  if (includeUri != null) {
    request.removeAttribute(JspConstants.INCLUDE_SERVLET_PATH);
  }
  try {
    context.getRequestDispatcher(path).forward(request, response);
  } finally {
    if (includeUri != null) {
      request.setAttribute(JspConstants.INCLUDE_SERVLET_PATH,
          includeUri);
    }
    request.setAttribute(JspConstants.FORWARD_SEEN, "true");
  }
}
origin: org.glassfish.web/javax.servlet.jsp

  out.clear();
} catch (IOException ex) {
  IllegalStateException ise =
origin: jboss.web/jbossweb

private void doForward(String relativeUrlPath) throws ServletException,
    IOException {
  // JSP.4.5 If the buffer was flushed, throw IllegalStateException
  try {
    out.clear();
  } catch (IOException ex) {
    IllegalStateException ise = new IllegalStateException(Localizer
        .getMessage("jsp.error.attempt_to_clear_flushed_buffer"));
    ise.initCause(ex);
    throw ise;
  }
  // Make sure that the response object is not the wrapper for include
  while (response instanceof ServletResponseWrapperInclude) {
    response = ((ServletResponseWrapperInclude) response).getResponse();
  }
  final String path = getAbsolutePathRelativeToContext(relativeUrlPath);
  String includeUri = (String) request
      .getAttribute(Constants.INC_SERVLET_PATH);
  if (includeUri != null)
    request.removeAttribute(Constants.INC_SERVLET_PATH);
  try {
    context.getRequestDispatcher(path).forward(request, response);
  } finally {
    if (includeUri != null)
      request.setAttribute(Constants.INC_SERVLET_PATH, includeUri);
  }
}
origin: org.jboss.web/jbossweb

private void doForward(String relativeUrlPath) throws ServletException,
    IOException {
  // JSP.4.5 If the buffer was flushed, throw IllegalStateException
  try {
    out.clear();
  } catch (IOException ex) {
    throw MESSAGES.illegalClearAfterFlush(ex);
  }
  // Make sure that the response object is not the wrapper for include
  while (response instanceof ServletResponseWrapperInclude) {
    response = ((ServletResponseWrapperInclude) response).getResponse();
  }
  final String path = getAbsolutePathRelativeToContext(relativeUrlPath);
  String includeUri = (String) request
      .getAttribute(Constants.INC_SERVLET_PATH);
  if (includeUri != null)
    request.removeAttribute(Constants.INC_SERVLET_PATH);
  try {
    context.getRequestDispatcher(path).forward(request, response);
  } finally {
    if (includeUri != null)
      request.setAttribute(Constants.INC_SERVLET_PATH, includeUri);
  }
}
origin: com.ovea.tajin.server/tajin-server-tomcat7

private void doForward(String relativeUrlPath) throws ServletException,
    IOException {
  // JSP.4.5 If the buffer was flushed, throw IllegalStateException
  try {
    out.clear();
  } catch (IOException ex) {
    IllegalStateException ise = new IllegalStateException(Localizer
        .getMessage("jsp.error.attempt_to_clear_flushed_buffer"));
    ise.initCause(ex);
    throw ise;
  }
  // Make sure that the response object is not the wrapper for include
  while (response instanceof ServletResponseWrapperInclude) {
    response = ((ServletResponseWrapperInclude) response).getResponse();
  }
  final String path = getAbsolutePathRelativeToContext(relativeUrlPath);
  String includeUri = (String) request.getAttribute(
      RequestDispatcher.INCLUDE_SERVLET_PATH);
  if (includeUri != null)
    request.removeAttribute(RequestDispatcher.INCLUDE_SERVLET_PATH);
  try {
    context.getRequestDispatcher(path).forward(request, response);
  } finally {
    if (includeUri != null)
      request.setAttribute(RequestDispatcher.INCLUDE_SERVLET_PATH,
          includeUri);
  }
}
origin: org.apache.tomcat/tomcat-jasper

@Override
public void forward(final String relativeUrlPath) throws ServletException, IOException {
  // JSP.4.5 If the buffer was flushed, throw IllegalStateException
  try {
    out.clear();
    baseOut.clear();
  } catch (IOException ex) {
    IllegalStateException ise = new IllegalStateException(Localizer.getMessage(
        "jsp.error.attempt_to_clear_flushed_buffer"));
    ise.initCause(ex);
    throw ise;
  }
  // Make sure that the response object is not the wrapper for include
  while (response instanceof ServletResponseWrapperInclude) {
    response = ((ServletResponseWrapperInclude) response).getResponse();
  }
  final String path = getAbsolutePathRelativeToContext(relativeUrlPath);
  String includeUri = (String) request.getAttribute(RequestDispatcher.INCLUDE_SERVLET_PATH);
  if (includeUri != null)
    request.removeAttribute(RequestDispatcher.INCLUDE_SERVLET_PATH);
  try {
    context.getRequestDispatcher(path).forward(request, response);
  } finally {
    if (includeUri != null) {
      request.setAttribute(RequestDispatcher.INCLUDE_SERVLET_PATH, includeUri);
    }
  }
}
origin: io.undertow.jastow/jastow

private void doForward(String relativeUrlPath) throws ServletException,
    IOException {
  // JSP.4.5 If the buffer was flushed, throw IllegalStateException
  try {
    out.clear();
    baseOut.clear();
  } catch (IOException ex) {
    throw MESSAGES.illegalClearAfterFlush(ex);
  }
  // Make sure that the response object is not the wrapper for include
  while (response instanceof ServletResponseWrapperInclude) {
    response = ((ServletResponseWrapperInclude) response).getResponse();
  }
  final String path = getAbsolutePathRelativeToContext(relativeUrlPath);
  String includeUri = (String) request.getAttribute(
      RequestDispatcher.INCLUDE_SERVLET_PATH);
  if (includeUri != null)
    request.removeAttribute(RequestDispatcher.INCLUDE_SERVLET_PATH);
  try {
    context.getRequestDispatcher(path).forward(request, response);
  } finally {
    if (includeUri != null)
      request.setAttribute(RequestDispatcher.INCLUDE_SERVLET_PATH,
          includeUri);
  }
}
javax.servlet.jspJspWriterclear

Javadoc

Clear the contents of the buffer. If the buffer has been already been flushed then the clear operation shall throw an IOException to signal the fact that some data has already been irrevocably written to the client response stream.

Popular methods of JspWriter

  • print
    Print an array of characters. The characters are written to the JspWriter's buffer or, if no buffer
  • write
  • flush
    Flush the stream. If the stream has saved any characters from the various write() methods in a buffe
  • clearBuffer
  • println
    Print an array of characters and then terminate the line. This method behaves as though it invokes p
  • getBufferSize
  • append
  • close
    Close the stream, flushing it first. This method needs not be invoked explicitly for the initial Jsp
  • getRemaining
    This method returns the number of unused bytes in the buffer.
  • newLine
    Write a line separator. The line separator string is defined by the system property line.separator,
  • isAutoFlush
    This method indicates whether the JspWriter is autoFlushing.
  • isAutoFlush

Popular in Java

  • Reading from database using SQL prepared statement
  • requestLocationUpdates (LocationManager)
  • getApplicationContext (Context)
  • getContentResolver (Context)
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • JComboBox (javax.swing)
  • JLabel (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now