Bugs item #886495, was opened at 2004-01-28 12:35
Message generated for change (Comment added) made by nobody
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=536613&aid=886495&group_id=73068

Category: export
Group: None
Status: Closed
Resolution: Fixed
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: ResponseOverrideFilter kills CSS in Struts templates

Initial Comment:
Hello - 
I'm using WebLogic 8.1 SP2 with Struts 1.1 templates.

When I try to get the ResponseOverrideFilter to work
with exports, I get an exception.

Servlet failed with Exception
java.lang.IllegalStateException: strict servlet API:
cannot call getWriter() after getOutputStream().......

This exception is being thrown from the line in
ResponseOverrideFilter that is:
PrintWriter out = servletResponse.getWriter();

Which is funny because getOutputStream() is never called...

But the real funny thing is that whenever this filter
is implemented in my web.xml, the generated HTML from
my Struts servlet ignores the CSS stylesheet and
therefore all the style is lost for the entire page.

Now, this only happens in Netscape 7.1
In IE 6 and Mozilla Firebird, the page is not even
displayed...I get a different exception:

java.net.ProtocolException: Exceeded stated
content-length of: '0' bytes

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2004-07-28 23:13

Message:
Logged In: NO 

aghag

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2004-03-19 05:42

Message:
Logged In: NO 

Is-it possible to open a new Bug to fix this ?

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2004-03-17 04:12

Message:
Logged In: NO 

Yes, I'd like to have this patch !
but I would prefer if this could be included in the "official" 
release

Many thanks anyway !
Eric
[EMAIL PROTECTED]

----------------------------------------------------------------------

Comment By: Chin-Hsien Lin (addisonlin)
Date: 2004-03-15 22:27

Message:
Logged In: YES 
user_id=659472

Hi, folks.

The b3 snapshot contains a new version of 
BufferedResponseWrapper that partially fixed the 
IllegalStateException problem but introduce a new one. I 
modified the flushBuffer() method to look like this:

    public void flushBuffer()
    {
        output.flush();
        getWriter().print(this.servletOutputStream.toString());
        this.servletOutputStream.outputStream.reset();
    }

Once in a while, Weblogic 8.1 calls flushBuffer() and 
getOutputStream(). Without the 2nd line, some of the original 
output will be accidentally thrown away. I merged the b3 
version's BufferedResponseWrapper into b2 source code, 
applied my patch and now everything works fine under 
Weblogic 8.1, Struts 1.1 (with Tiles). I can send you my 
patch if you need it.

Addison
[EMAIL PROTECTED]


----------------------------------------------------------------------

Comment By: Chin-Hsien Lin (addisonlin)
Date: 2004-03-15 01:55

Message:
Logged In: YES 
user_id=659472

Yes, I was using display tag b2 release. But I downloaded the 
latest b3 snapshot and did two tests: First I tried the bundled 
displaytag-examples.war, turn on the response filter in 
web.xml and there's no IllegalStateException. Second, I try 
my own Struts example with b3 release and nothing comes 
out from the first page (index.jsp). I'm encountering the same 
problem that Eric ([EMAIL PROTECTED]) is having (date: 2/27).

----------------------------------------------------------------------

Comment By: andy pruitt (rapruitt)
Date: 2004-03-14 21:03

Message:
Logged In: YES 
user_id=573666

addisonlin - can you conifirm that this is happening with
the nightly build release?  Or are you using the b2 release?
 The fix went in after the b2 release.

----------------------------------------------------------------------

Comment By: Chin-Hsien Lin (addisonlin)
Date: 2004-03-14 18:55

Message:
Logged In: YES 
user_id=659472

Hi, I'm encountering the exact same problem. But I'm using 
IE6. I'm also using Weblogic 8.1 SP2 and Struts 1.1. Is there 
a quick fix for the problem? I've tested it with Weblogic 6.1 
SP3, Tomcat 4/5, there are no such problem with these 
platforms.

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2004-02-27 06:10

Message:
Logged In: NO 

I've got the same problem using WebLogic 7.0 SP3.
B3 fixed the "java.lang.IllegalStateException: strict servlet 
API: cannot call getWriter() after getOutputStream()......." 
message
but now nothing is shown in the browser  (IE6 SP1)
HTML result : 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 
Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; 
charset=iso-8859-1"></HEAD>
<BODY></BODY></HTML>

for each page that is filtered by ResponseOverrideFilter even 
if this page doesn't contain displaytag

Eric
[EMAIL PROTECTED]


----------------------------------------------------------------------

Comment By: andy pruitt (rapruitt)
Date: 2004-02-16 08:26

Message:
Logged In: YES 
user_id=573666

fixed the cannot call getWriter() after getOutputStream() -
can you confirm that this css issue is not an issue?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=536613&aid=886495&group_id=73068


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
displaytag-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel

Reply via email to