List Info

Thread: 2.4.48 is available (WikiServletFilter)




2.4.48 is available (WikiServletFilter)
user name
2006-09-06 21:42:32
http://edocs.bea.com/wls/docs81/servlet/progtasks.html

says

"You can use both PrintWriter and ServletOutputStream
in the same  
servlet (or in another servlet that is included in a
servlet). The  
output of both is written to the same buffer."

Anybody tried JSPWiki on Weblogic 8.1?  Can Weblogic 9 be
turned into  
some compatibility mode?

/Janne

On 6 Sep 2006, at 16:25, marpatelenet.be wrote:

> Unfortunately it seems not that simple...
> I did a test and replaced getOutputStream() with
getWriter() but  
> now I get an error:
> java.lang.IllegalStateException: strict servlet API:
cannot call  
> getWriter() after getOutputStream()
>         at
weblogic.servlet.internal.ServletResponseImpl.getWriter 
> (ServletResponseImpl.java:181)
>         at
com.ecyrd.jspwiki.ui.WikiServletFilter.doFilter 
> (WikiServletFilter.java:122)
>
> (instead of cannot call getOutputStream() after
getWriter())
>
> So it seems that throughout the complete codebase both 

> getOutputStream and getWriter are used mixed, the
problem is to  
> find out where exactly the problem is, the stacktrace
is not very  
> helpfull here.
>
> Another thing is that with the default template, the
server log  
> displays the error but the page is still displayed,
with the  
> brushed template the error jsp is shown.
> I also tried it with Tomcat, just to be sure, no error
is shown.
>
> Marc
>
>
>> Good, this helps a lot.  I don't have Weblogic to
test with, so I  
>> need
>> to rely on my users to find out particulars .
>
>> /Janne
>
> On Wed, Sep 06, 2006 at 10:05:47AM +0000, marpa at
telenet.be wrote:
>> Janne,
>>
>> one issue I would like to be solved is the
following error with  
>> WikiServletFilter:
>>
>> java.lang.IllegalStateException
>> Cannot use ServletOutputStream because a Writer is
being used. Use  
>> getWriter() instead.
>>
>> It seems only Weblogic is complaining about this
but it is  
>> certainly a 'bug'
>> (see e.g. 
http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/ 
>> servlet/ServletResponse.html, under getWriter)
>>
>> As far as I can pinpoint it, the problem is in
WikiServletFilter  
>> (line 120, response.getOutputStream().write( bytes
);).
>> On line 102 however you call:
>> ServletResponseWrapper responseWrapper = new  
>> MyServletResponseWrapper(
(HttpServletResponse)response );
>> and MyServletResponseWrapper uses PrintWriter
getWriter().
>>
>> So line 120 should probably read:
response.getWriter().write 
>> ( bytes );
>>
>> Marc Patteet
>>
>>> In other words... I want to release a stable. 
Does anyone know of
>>> any showstoppers which should delay release? 
This is the time to go
>>> through your pet bugs, submit fixes or beg
anyone else to fix  
>>> them...
>>>
>>> /Janne
>>
>
>
> _______________________________________________
> Jspwiki-users mailing list
> Jspwiki-usersecyrd.com
> http://ecyrd.com/cgi-bin/mailman/listinfo/jspwiki-users

_______________________________________________
Jspwiki-users mailing list
Jspwiki-usersecyrd.com
http://ecyrd.com/cgi-bin/mailman/listinfo/jspwiki-users
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )