Results 1 to 2 of 2
  1. #1
    carolwind is offline Member
    Join Date
    Mar 2013
    Rep Power

    Default What's the matter? Struts+SQLServer

    Servlet.service() for servlet [jsp] in context with path [/rsglxt] threw exception [java.lang.IllegalStateException: getOutputStream() has already been called for this response] with root cause
    java.lang.IllegalStateException: getOutputStream() has already been called for this response
    at org.apache.catalina.connector.Response.getWriter(R
    at org.apache.catalina.connector.ResponseFacade.getWr iter(
    at org.apache.jasper.runtime.JspWriterImpl.initOut(Js
    at org.apache.jasper.runtime.JspWriterImpl.flushBuffe r(
    at org.apache.jasper.runtime.PageContextImpl.release(
    at org.apache.jasper.runtime.JspFactoryImpl.internalR eleasePageContext(
    at org.apache.jasper.runtime.JspFactoryImpl.releasePa geContext(
    at org.apache.jsp.yanzhengma_jsp._jspService(yanzheng
    at org.apache.jasper.runtime.HttpJspBase.service(Http
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:728)
    at org.apache.jasper.servlet.JspServletWrapper.servic e(
    at org.apache.jasper.servlet.JspServlet.serviceJspFil e(
    at org.apache.jasper.servlet.JspServlet.service(JspSe
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:728)
    at ternalDoFilter(
    at Filter(
    at org.apache.struts2.dispatcher.ActionContextCleanUp .doFilter(
    at ternalDoFilter(
    at Filter(
    at org.apache.struts2.dispatcher.FilterDispatcher.doF ilter(
    at ternalDoFilter(
    at Filter(
    at org.apache.catalina.core.StandardWrapperValve.invo ke(
    at org.apache.catalina.core.StandardContextValve.invo ke(
    at org.apache.catalina.authenticator.AuthenticatorBas e.invoke(
    at org.apache.catalina.core.StandardHostValve.invoke(
    at org.apache.catalina.valves.ErrorReportValve.invoke (
    at org.apache.catalina.valves.AccessLogValve.invoke(A
    at org.apache.catalina.core.StandardEngineValve.invok e(
    at org.apache.catalina.connector.CoyoteAdapter.servic e(
    at org.apache.coyote.http11.AbstractHttp11Processor.p rocess(
    at org.apache.coyote.AbstractProtocol$AbstractConnect ionHandler.process(
    at java.util.concurrent.ThreadPoolExecutor.runWorker( Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$ (Unknown Source)
    at Source)

    My server.xml:

    <Context path="/rsglxt" docBase="D:\Users\wind\workspace\rsglxt"
    debug="5" reloadable="true" crossContext="true" workDir="D:\Users\wind\workspace\rsglxt\work">
    <Resource name="jdbc/rsglxt"
    maxActive="100" maxIdle="30" maxWait="10000"
    username="admin" password="123456"
    driverClassName=" erverDriver"

    I have tested connect sqlserver successfully by odbc data source. But I log in from homepage of my java programe, it shows this error.

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Rep Power

    Default Re: What's the matter? Struts+SQLServer

    That error is saying you have already started writing to the client and are now trying to get hold of the output stream again, which is not allowed.

    Is there an Action associated with whatever call causes this?
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. Replies: 7
    Last Post: 11-29-2012, 11:49 AM
  2. Time bogging matter
    By zNinjaa in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 03-01-2011, 10:31 PM
  3. Replies: 6
    Last Post: 12-10-2010, 08:43 AM
  4. Error message pops up no matter what?
    By murr0508 in forum New To Java
    Replies: 5
    Last Post: 02-26-2009, 10:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts