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

    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 esponse.java:639)
    at org.apache.catalina.connector.ResponseFacade.getWr iter(ResponseFacade.java:214)
    at org.apache.jasper.runtime.JspWriterImpl.initOut(Js pWriterImpl.java:125)
    at org.apache.jasper.runtime.JspWriterImpl.flushBuffe r(JspWriterImpl.java:118)
    at org.apache.jasper.runtime.PageContextImpl.release( PageContextImpl.java:190)
    at org.apache.jasper.runtime.JspFactoryImpl.internalR eleasePageContext(JspFactoryImpl.java:126)
    at org.apache.jasper.runtime.JspFactoryImpl.releasePa geContext(JspFactoryImpl.java:80)
    at org.apache.jsp.yanzhengma_jsp._jspService(yanzheng ma_jsp.java:138)
    at org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:728)
    at org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:432)
    at org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:390)
    at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:334)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:728)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:210)
    at org.apache.struts2.dispatcher.ActionContextCleanUp .doFilter(ActionContextCleanUp.java:99)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:210)
    at org.apache.struts2.dispatcher.FilterDispatcher.doF ilter(FilterDispatcher.java:413)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:222)
    at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBas e.invoke(AuthenticatorBase.java:472)
    at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:171)
    at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:99)
    at org.apache.catalina.valves.AccessLogValve.invoke(A ccessLogValve.java:936)
    at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.p rocess(AbstractHttp11Processor.java:1004)
    at org.apache.coyote.AbstractProtocol$AbstractConnect ionHandler.process(AbstractProtocol.java:589)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProce ssor.run(JIoEndpoint.java:312)
    at java.util.concurrent.ThreadPoolExecutor.runWorker( Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (Unknown Source)
    at java.lang.Thread.run(Unknown 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"
    auth="Container"
    type="javax.sql.DataSource"
    maxActive="100" maxIdle="30" maxWait="10000"
    username="admin" password="123456"
    driverClassName="com.microsoft.sqlserver.jdbc.SQLS erverDriver"
    url="jdbc:sqlserver://localhost:1433;DatabaseName=tempdb"/>
    </Context>

    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
    Posts
    11,755
    Rep Power
    19

    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
  •