Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 17th, 2003, 08:43 AM
jaideep jaideep is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 1 jaideep User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
IllegalStateException on response.getOutputStream()

I am using a JSP, which is used for html presentation & a servlet is called from this JSP, which invokes a response.getOutputStream() & this results in IllegalStateException being thrown. According to servlets specifications, servlet can support either of the JspWriter or OutputStream object. So it is illegal to call getOutputStream() method on the response object as 'out' object is already present in any JSP (internally there must be a call like response.getWriter() to fetch this 'out;' object).

Any solution for this? I want to use OutputStream object somehow or the other in a JSP.

I am using JRun4 app server. It follows the servlet specs strictly. However i have found some low end app servers like Resin, which do not follo servlet sepcifications strictly, being able to handle this senario. But I need to use JRun4. No other option.

Any solution anybody?

Jaideep

Reply With Quote
  #2  
Old April 21st, 2003, 09:09 AM
Nemi Nemi is offline
Clueless llama
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Feb 2001
Location: Lincoln, NE. USA
Posts: 2,353 Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 2 Days 12 h 35 m 19 sec
Reputation Power: 111
I understand the problem, but I don't understand why it is a problem. Why do you need to get the outputstream in a servlet that is included by a jsp?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > IllegalStateException on response.getOutputStream()


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway