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

download file when using weblogic 6.1

10 views
Skip to first unread message

netoasis

unread,
Oct 8, 2002, 2:46:11 AM10/8/02
to

hi,
When I download a .jar file using WLS 6.1 sp1, the file was corrupted.and I

always got the same errors just like :

<Error> <HTTP> <Servlet execution in servlet context "WebAppServletContext
(6679584,mapsweb,/mapsweb)" failed, java.net.ProtocolException: Didn't meet
stated Content-Length, wrote: '78' bytes instead of stated: '86327' bytes.
java.net.ProtocolException: Didn't meet stated Content-Length, wrote: '78' bytes
instead of stated: '86327' bytes.
at weblogic.servlet.internal.ServletOutputStreamImpl.finish(ServletOutpu
tStreamImpl.java:413)
at weblogic.servlet.internal.ServletResponseImpl.send(ServletResponseImp
l.java:974)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:1964)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

the jar file's actual size is 86327.but after downloading, the jar size became

(86327+78) bytes.at the beginning of the jar file-- the first 78 bytes were
all "0d0a" ,I don't know when they are inserted .

is it a bug of weblogic?

Charlie Sadler

unread,
Oct 8, 2002, 10:50:14 AM10/8/02
to
I'm guessing you've got a .jsp which attempts to download a file to the
client browser. Remember anything not inside JSP markup gets compiled to
out.print. "0d0a" is I think a carriage-return line-feed. I'm guessing
you've got 39 lines of JSP code prior to the code which downloads the file.
You might try spanning the line ends with a comment. For example,
<%@ page buffer="64kb" %><%--
--%><%@ page import="java.util.Iterator" %><%--
--%><%@ page import="java.util.HashMap" %><%--
--%><% //code to download the file...

"netoasis" <sam...@wizdomtech.com> wrote in message
news:3da2...@newsgroups.bea.com...

Rajesh Mirchandani

unread,
Oct 8, 2002, 2:49:14 PM10/8/02
to
Upgrade to SP3.

Charlie Sadler wrote:

--
Rajesh Mirchandani
Developer Relations Engineer
BEA Support


Charlie Sadler

unread,
Oct 9, 2002, 4:32:11 PM10/9/02
to
Rajesh,
How does SP3 resolve the issue? Doesn't the JSP spec say anything not in
tags gets sent to the output?
Thanks, Charlie

"Rajesh Mirchandani" <Re...@ToNewsgroup.Only> wrote in message
news:3DA328A...@ToNewsgroup.Only...

netoasis

unread,
Oct 9, 2002, 9:41:42 PM10/9/02
to

thanks charlie, it works. i follow ur suggestion and now it works.
0 new messages