Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

filter illegalstateexception

14 views
Skip to first unread message

arock

unread,
Apr 1, 2002, 9:00:17 AM4/1/02
to

hi,
i am trying to use hit counter in the java servlet tutorial. But I get the following
error. Please let me know what mistakes i am doing.

thanks in advance


thanks
arock

<Error> <HTTP> <[WebAppServletContext(8243998,filte
r,/filter)] Servlet failed with Exception
java.lang.IllegalStateException: strict servlet API: cannot call getOutputStream
() after getWriter()
at weblogic.servlet.internal.ServletResponseImpl.getOutputStream(Servlet
ResponseImpl.java:137)
at javax.servlet.ServletResponseWrapper.getOutputStream(ServletResponseW
rapper.java:136)
at weblogic.servlet.jsp.JspWriterImpl.<init>(JspWriterImpl.java:23)
at weblogic.servlet.jsp.PageContextImpl.<init>(PageContextImpl.java:78)
at weblogic.servlet.jsp.JspFactoryImpl.getPageContext(JspFactoryImpl.jav
a:31)
at jsp_servlet.__sample._jspService(__sample.java:74)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:265)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:21)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
va:27)
at Compress.doFilter(Compress.java:42)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
va:27)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:2501)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2204)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>

Greg

unread,
Apr 1, 2002, 10:59:19 PM4/1/02
to

Don't know anything about this tutorial, but it looks like you're trying to create
a Stream object after you've already created a Writer object. If you need a Stream
object (like for byte streams) comment out the Writer stuff.

Bartek N.

unread,
Apr 26, 2002, 1:31:40 PM4/26/02
to
Hi!

I'm trying to deploy OpenCMS application (downloaded from web as a war
file) and I got the same exception when running WL6.1. The funny thing
is that it works (with some magic with XML parser) on WL7.0beta.
So, I think the problem is in implementation of servlet API. I
considered using the javax.servlet package from WL7.0b (or from Sun's
J2EE) but don't know how to force WL to use servlet API implementation
from MY jar file for MY servlets. I've seen WL in lib/ directory had
more then one jar with implementation of javax.servlet... The question
is how the WL choose the right one?

Any help welcome...

Regards,
Bartek
bar...@bellstream.pl

0 new messages