Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 오라클
- Download
- 미라지
- 2NE1
- javascript
- 10g
- Oracle
- 설치
- 링크
- oracle not exists
- DATABASE
- iTunes
- Modeling
- 이클립스
- java
- eclipse
- 검색
- oracle not in
- update
- jquery
- 한글
- SELECT UPDATE
- input box
- 태그를 입력해 주세요.
- 다운로드
- jqeury
- html
- 개발자
- error
- M480
Archives
- Today
- Total
not set
JSP - getOutputStream() has already been called for this response 본문
Tool/Exception
JSP - getOutputStream() has already been called for this response
다크곰 2009. 3. 23. 16:5416:42:49,687 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
java.lang.IllegalStateException: getOutputStream() has already been called for this response
at org.apache.catalina.connector.Response.getWriter(Response.java:604)
at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:198)
at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:125)
at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:118)
at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:186)
at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:117)
at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:76)
at org.apache.jsp.co.bizcomm.ImageFile_jsp._jspService(ImageFile_jsp.java:208)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.ksl.tossframework.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:121)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:595)
이 익셉션은 jsp 페이지에서 OutputStream을 사용했을 때 발생한다.
(FileDownLoad사용시에 에러가 발생했음)
이유:
jsp는 servlet으로 변환될 때 자동적으로 write객체(?)를 가져오는데,
OutputStream을 가져오는 객체가 있으면 혼선(?)으로 익셉션이 난다.
그런 이유로
정식적으로는 jsp페이지에서 OutputStream을 쓰는것 자체가 안되는것이다.
(servlet 페이지에서 작성)
하지만!
굳이 jsp페이지에서 써야 할경우
1) response.getWriter()를 호출하던가(아직 안해봤음 ㅡ,,ㅡ)
2) try {
out.clear(); //out--> jsp자체 객체
out=pageContext.pushBody(); //out--> jsp자체 객체
OutputStream fout = response.getOutputStream();
.
.
.
요런식으로 OutputStream객체를 생성하기 전에
jsp자체의 out객체를 비워주고 <body>태그 바깥으로 밀어내야(??) 한다.
'Tool > Exception' 카테고리의 다른 글
ora-01861 literal does not match format string (0) | 2011.04.12 |
---|---|
Eclipse Exception (0) | 2010.12.14 |
Oracle Exception java.sql.SQLException: 해당 위치에 폐기된 SQL92 문자열: 1797 (0) | 2010.04.28 |
이클립스 tomcat start시 오류 (0) | 2010.03.30 |
apache - Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName httpd (0) | 2009.06.10 |