Exception about content-length of JSP

My jsp runs with such exception:
          and I can't find out where is wrong in the jsp.The attachment is the
          jsp-generated java source file.
          Environment:
          JDK1.3
          Weblogic 5.1 with SP6
          Windows2000 Server
          Thanks for your help!
          13:47:17 GMT+08:00 2000:<E> <ServletContext-General> Servlet failed with
          Exception
          java.net.ProtocolException: Exceeded stated content-length of: 408 bytes
          at
          weblogic.servlet.internal.ServletOutputStreamImpl.write(ServletOutput
          StreamImpl.java:163)
          at
          weblogic.servlet.internal.WLOutputStreamWriter.flushBuffer(WLOutputSt
          reamWriter.java:139)
          at
          weblogic.servlet.internal.WLOutputStreamWriter.write(WLOutputStreamWr
          iter.java:104)
          at
          weblogic.servlet.internal.WLOutputStreamWriter.write(WLOutputStreamWr
          iter.java:111)
          at java.io.Writer.write(Writer.java:129)
          at weblogic.servlet.jsp.JspWriterImpl.print(JspWriterImpl.java:138)
          at
          jsp_servlet._icmcout0._browserpagemainicmcout0._jspService(_browserpa
          gemainicmcout0.java:174)
          at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
          at
          weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
          pl.java:123)
          at
          weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
          textImpl.java:761)
          at
          weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
          textImpl.java:708)
          at
          weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet
          ContextManager.java:252)
          at
          weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.jav
          a:346)
          at
          weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:246)
          at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:135)
          [_browserpagemainicmcout0.java]
          

My jsp runs with such exception:
          and I can't find out where is wrong in the jsp.The attachment is the
          jsp-generated java source file.
          Environment:
          JDK1.3
          Weblogic 5.1 with SP6
          Windows2000 Server
          Thanks for your help!
          13:47:17 GMT+08:00 2000:<E> <ServletContext-General> Servlet failed with
          Exception
          java.net.ProtocolException: Exceeded stated content-length of: 408 bytes
          at
          weblogic.servlet.internal.ServletOutputStreamImpl.write(ServletOutput
          StreamImpl.java:163)
          at
          weblogic.servlet.internal.WLOutputStreamWriter.flushBuffer(WLOutputSt
          reamWriter.java:139)
          at
          weblogic.servlet.internal.WLOutputStreamWriter.write(WLOutputStreamWr
          iter.java:104)
          at
          weblogic.servlet.internal.WLOutputStreamWriter.write(WLOutputStreamWr
          iter.java:111)
          at java.io.Writer.write(Writer.java:129)
          at weblogic.servlet.jsp.JspWriterImpl.print(JspWriterImpl.java:138)
          at
          jsp_servlet._icmcout0._browserpagemainicmcout0._jspService(_browserpa
          gemainicmcout0.java:174)
          at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
          at
          weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
          pl.java:123)
          at
          weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
          textImpl.java:761)
          at
          weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
          textImpl.java:708)
          at
          weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet
          ContextManager.java:252)
          at
          weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.jav
          a:346)
          at
          weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:246)
          at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:135)
          [_browserpagemainicmcout0.java]
          

Similar Messages

  • Content-length in JSP

    Hi,
    I need to set the HTTP header 'Content-Length'
    from a JSP page, but cannot figure out how.
    // Lars Krog-Jensen

    response.setContentLength(theLength)

  • Content-length error in jsp

              hi all,
              i am running a jsp on weblogic that just displays an index page.
              there is no problem in displaying the page but,on the console i get this error.
              how to solve this error.
              Thanks in advance.
              Parag B.Bhagwat
              java.net.ProtocolException: Didn't meet stated Content-Length, wrote: '4096' bytes instead of stated: '12063' bytes.
                   at weblogic.servlet.internal.ServletOutputStreamImpl.finish(ServletOutputStreamImpl.java:372)
                   at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:249)
                   at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:361)
                   at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:261)
                   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
              Wed Jan 19 22:55:10 GMT+05:30 2000:<E> <ServletContext-General> Servlet failed with Exception
              java.net.SocketException: socket write error (code=10053)
                   at java.net.SocketOutputStream.socketWrite(Native Method)
                   at java.net.SocketOutputStream.write(SocketOutputStream.java, Compiled Code)
                   at weblogic.servlet.internal.ChunkUtils.writeChunks(ChunkUtils.java, Compiled Code)
                   at weblogic.servlet.internal.ServletOutputStreamImpl.flush(ServletOutputStreamImpl.java, Compiled Code)
                   at weblogic.servlet.internal.ServletOutputStreamImpl.writeStream(ServletOutputStreamImpl.java, Compiled Code)
                   at weblogic.servlet.FileServlet.sendFile(FileServlet.java:199)
                   at weblogic.servlet.FileServlet.service(FileServlet.java:56)
                   at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
                   at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java, Compiled Code)
                   at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:742)
                   at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:686)
                   at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:247)
                   at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:361)
                   at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:261)
                   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
              

    Hello,
              I am facing the same problem of content length... Did you find a solution for it?
              Thanks
              Parag Bhagwat wrote:
              > hi all,
              >
              > i am running a jsp on weblogic that just displays an index page.
              > there is no problem in displaying the page but,on the console i get this error.
              > how to solve this error.
              > Thanks in advance.
              > Parag B.Bhagwat
              > ---------------------------------------------------------------
              > java.net.ProtocolException: Didn't meet stated Content-Length, wrote: '4096' bytes instead of stated: '12063' bytes.
              > at weblogic.servlet.internal.ServletOutputStreamImpl.finish(ServletOutputStreamImpl.java:372)
              > at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:249)
              > at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:361)
              > at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:261)
              > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
              >
              > Wed Jan 19 22:55:10 GMT+05:30 2000:<E> <ServletContext-General> Servlet failed with Exception
              > java.net.SocketException: socket write error (code=10053)
              > at java.net.SocketOutputStream.socketWrite(Native Method)
              > at java.net.SocketOutputStream.write(SocketOutputStream.java, Compiled Code)
              > at weblogic.servlet.internal.ChunkUtils.writeChunks(ChunkUtils.java, Compiled Code)
              > at weblogic.servlet.internal.ServletOutputStreamImpl.flush(ServletOutputStreamImpl.java, Compiled Code)
              > at weblogic.servlet.internal.ServletOutputStreamImpl.writeStream(ServletOutputStreamImpl.java, Compiled Code)
              > at weblogic.servlet.FileServlet.sendFile(FileServlet.java:199)
              > at weblogic.servlet.FileServlet.service(FileServlet.java:56)
              > at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
              > at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java, Compiled Code)
              > at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:742)
              > at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:686)
              > at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:247)
              > at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:361)
              > at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:261)
              > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
              Walid El Daccache
              Net SNA Team
              SoftSolutions, Lebanon
              

  • SunOne Web Server 6.1 and JSP response content-length

    Hi,
    I am looking for help for a problem in my previous post
    http://swforum.sun.com/jive/thread.jspa?threadID=58612.
    It seems to me the only significant difference of the response to the same jsp file from 6.0 and 6.1 server is the content-length header.
    6.0 response has the content-length header;
    6.1 response does not have the content-length header.
    HttpUrlConnection::getContentLength() returns the actual content length of the 6.0 response;
    HttpUrlConnection::getContentLength() returns -1 for the 6.1 response.
    Here is the dump,
    SunOne WebServer 6.0
    allowUserInteraction? false
    content? sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@1eed786
    contentEncoding? null
    contentLength? 999
    contentType? application/x-java-jnlp-file
    Date? 1131378080000
    DefaultAllowUserInteraction? false
    DefaultUseCaches? true
    DoInput? true
    DoOutput? false
    Expiration? Wed Dec 31 19:00:00 EST 1969
    FileNameMap? java.net.URLConnection$1@1a1c887
    lastModified? Wed Dec 31 19:00:00 EST 1969
    requestMethod? GET
    responseCode? 200
    responseMessage? OK
    HEADER::Set-cookie=[JSESSIONID=pkand013-1%253A436f75a0%253A5b909ee2e5bbe3bc;path=/]
    HEADER::Date=[Mon, 07 Nov 2005 15:41:20 GMT]
    HEADER::Server=[Netscape-Enterprise/6.0]
    HEADER::null=[HTTP/1.1 200 OK]
    HEADER::Content-length=[999]
    HEADER::Content-type=[application/x-java-jnlp-file]
    SunOne WebServer 6.1
    allowUserInteraction? false
    content? sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@1fee6fc
    contentEncoding? null
    contentLength? -1
    contentType? application/x-java-jnlp-file
    Date? Mon Nov 07 10:49:07 EST 2005
    DefaultAllowUserInteraction? false
    DefaultUseCaches? true
    DoInput? true
    DoOutput? false
    Expiration? Wed Dec 31 14:00:00 EST 1969
    FileNameMap? java.net.URLConnection$1@1503a3
    lastModified? Wed Dec 31 19:00:00 EST 1969
    requestMethod? GET
    responseCode? 200
    responseMessage? OK
    HEADER::null=[HTTP/1.1 200 OK]
    HEADER::Expires=[Wed, 31 Dec 1969 19:00:00 EST]
    HEADER::Set-cookie=[JSESSIONID=44A318F4BC0802A4C70C27FD4AB1C115;Path=/]
    HEADER::Transfer-encoding=[chunked]
    HEADER::Date=[Mon, 07 Nov 2005 15:49:07 GMT]
    HEADER::Pragma=[No-cache]
    HEADER::Server=[Sun-ONE-Web-Server/6.1]
    HEADER::Content-type=[application/x-java-jnlp-file]
    HEADER::Cache-control=[no-cache]
    In my test env, 6.0 and 6.1 are installed on the same machine (Win2K), using the same directory as web root, same http port. Browser runs on a different machine.
    Thanks
    Harry

    Hi, elving
    This is good information. Thanks very much.
    Actually, I am not using SSL, just plain http connection with basic auth. It might be the cache-control header that causes the head ache. 6.0 response does not have the cache-control header, but 6.1 has.
    The interesting thing is that adding a servlet mapping on 6.1 solves the problem.
    I will take a further look tomorrow.
    Cheers,
    Harry
    I doubt the problem has to do with the Content-Length
    header.
    I'd guess that you're using SSL. Are you? If so,
    you're almost certainly bumping into a known bug (or,
    as Microsoft describes it, a "feature") in Internet
    Explorer. Microsoft article KB316431 at
    http://support.microsoft.com/default.aspx?scid=316431h
    as some information on the problem. As the article
    points out, the problem occurs when Internet Explorer
    needs to invoke an external application to handle a
    file that was served over SSL with Cache-Control:
    no-cache and/or Pragma: no-cache headers.
    A work around would be force Web Server to send
    Cache-Control and Pragma headers that don't include
    the no-cache directive. For example, the following
    lines could be added to the obj.conf configuration
    file:<Object ppath="*.jnlp">
    Output fn="set-variable" set-srvhdrs="Cache-Control:
    private"
    Output fn="set-variable" set-srvhdrs="Pragma:
    private"
    </Object>Fortunately, it sounds like you've already
    found another viable work around.

  • How to solve "Bad Content-Length value" Error that show in ADF Mobile

    I was develop application that using web service from mine original ADF project and I can't fetch via AMX Page as pop-up error "Bad Content-Length value" How to solve this problem ?
    My Web-service configuration
    - "Find" is only basic operation that in view instance
    - None of View criteria
    As only find is basic operation, that seems required "findCriteria" and "findControl" parameter(as seen in "Panel From layout" generated in AMX Page)
    After drag generate form view in AMX Page and after to deploy to simulator, I was found pop-up error was said Bad Content-Length value as shown below.
    I am also using HTTP Analyzer and didn't found any request from ADF Mobile Application
    http://img844.imageshack.us/img844/7720/screenshot20130305at163.png

    Hi,
    I'm also got a problem with this tutorial too, after touch at "Salary Upgrade" button and got same error too
    http://docs.oracle.com/cd/E18941_01/tutorials/BuildingMobileApps/ADFMobileTutorial_2.html
    I have some conclusion with develop ADF Mobile in OSX will related with this problem as tutorial are properly working and nobody was said about this problem.
    My current development machine is OSX 10.8.2 with jDeveloper 11.1.2.3.0
    Edited by: meddlesome on Mar 7, 2013 2:49 AM

  • HTTP Compression causes HTTP2228: Response content length mismatch

    Dear All,
    My application use iPlanet 6.1, recently we have enabled HTTP compression for the webserver.
    Which inturn does not picking up style sheet and results with bad look and feel on front end.
    On the back iPlanet logs we see some errors like
    warning (23569): for host xxx.xxx.xxx.xxtrying to GET /zbank2/css/zbank.css, finish-response reports: HTTP2228: Response content length mismatch (315 bytes with a content length of 945)
    Could you please help to resolve this problem
    Thanks,
    Jude

    Can you send your css file? I tried it on Web Server 7.0 update 3 seems to be working fine.
    I made a css file from [http://www.w3.org/Style/Examples/011/firstcss|http://www.w3.org/Style/Examples/011/firstcss]
    $cat mystyle.css
    body {
      padding-left: 11em;
      font-family: Georgia, "Times New Roman",
            Times, serif;
      color: purple;
      background-color: #d8da3d }
    ul.navbar {
      list-style-type: none;
      padding: 0;
      margin: 0;
      position: absolute;
      top: 2em;
      left: 1em;
      width: 9em }
    h1 {
      font-family: Helvetica, Geneva, Arial,
            SunSans-Regular, sans-serif }
    ul.navbar li {
      background: white;
      margin: 0.5em 0;
      padding: 0.3em;
      border-right: 1em solid black }
    ul.navbar a {
      text-decoration: none }
    a:link {
      color: blue }
    a:visited {
      color: purple }
    address {
      margin-top: 1em;
      padding-top: 1em;
      border-top: thin dotted }
    $cat myhtml.html
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
    <html>
    <head>
      <title>My first styled page</title>
      <link rel="stylesheet" href="mystyle.css">
    </head>
    <body>
    This is style.html
    </body>
    </html>$cat obj.conf
    <Object name="default">
    AuthTrans fn="match-browser" browser="*MSIE*" ssl-unclean-shutdown="true"
    NameTrans fn="ntrans-j2ee" name="j2ee"
    NameTrans fn="pfx2dir" from="/mc-icons" dir="/export1/wsNov4/iplanet/ias/server/work/B1/SunOS5.8_DBG.OBJ/lib/icons" name="es-internal"
    PathCheck fn="uri-clean"
    PathCheck fn="check-acl" acl="default"
    PathCheck fn="find-pathinfo"
    PathCheck fn="find-index-j2ee"
    PathCheck fn="find-index" index-names="index.html,home.html,index.jsp"
    ObjectType fn="type-j2ee"
    ObjectType fn="type-by-extension"
    ObjectType fn="force-type" type="text/plain"
    Service method="(GET|HEAD)" type="magnus-internal/directory" fn="index-common"
    Service method="(GET|HEAD|POST)" type="*~magnus-internal/*" fn="send-file"
    Service method="TRACE" fn="service-trace"
    Output fn="insert-filter" filter="http-compression" type="text/*" vary="on" fragment-size="8096" compression-level="6"
    Error fn="error-j2ee"
    AddLog fn="flex-log"
    </Object>
    <Object name="j2ee">
    Service fn="service-j2ee" method="*"
    </Object>
    <Object name="es-internal">
    PathCheck fn="check-acl" acl="es-internal"
    </Object>
    <Object name="cgi">
    ObjectType fn="force-type" type="magnus-internal/cgi"
    Service fn="send-cgi"
    </Object>
    <Object name="send-precompressed">
    PathCheck fn="find-compressed"
    </Object>
    <Object name="compress-on-demand">
    Output fn="insert-filter" filter="http-compression"
    </Object>Sent a request, but I didn't see any errors
    [07/Nov/2008:12:58:53] finest (22021):  GET /mystyle.css, func_exec reports: executing method="(GET|HEAD|POST)" type="*~magnus-internal/*" fn="send-file" Directive="Service"
    [07/Nov/2008:12:58:53] finest (22021):  GET /mystyle.css, func_exec reports: executing fn="insert-filter" filter="http-compression" type="text/*" vary="on" fragment-size="8096" compression-level="6" Directive="Output" magnus-internal=""
    [07/Nov/2008:12:58:53] fine (22021): inserted filter http-compression
    [07/Nov/2008:12:58:53] finest (22021):  GET /mystyle.css, func_exec reports: fn="insert-filter" filter="http-compression" type="text/*" vary="on" fragment-size="8096" compression-level="6" Directive="Output" magnus-internal="" returned 0 (REQ_PROCEED)
    [07/Nov/2008:12:58:53] finest (22021):  GET /mystyle.css, func_exec reports: method="(GET|HEAD|POST)" type="*~magnus-internal/*" fn="send-file" Directive="Service" returned 0 (REQ_PROCEED)...ssltap shows the response was encoded :
    --> [
    GET /mystyle.css HTTP/1.1^M
    Host: ....
    User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.8.1.2) Gecko/20070225
    Firefox/2.0.0.2^M
    Accept: text/css,*/*;q=0.1^M
    Accept-Language: en-us,en;q=0.5^M
    Accept-Encoding: gzip,deflate^M
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7^M
    Keep-Alive: 300^M
    Connection: keep-alive^M
    Referer: http://.../myhtml.html^M
    Cookie: SUN_ID=129.147.37.51:287861225347735; s_vi=[CS]v1|48F6E7BF00000316-A02082200000556[CE]; nfTimeStamps=19700101000000%7C19700101000000%7C19700101000000; nfSettings=112101110%7C%7Cen_US%7C%7C0%7C60%7C-1%7C%7Cweek%7C-1%7C; location=US;
    s_cc=true; s_sq=%5B%5BB%5D%5D; AMAuthCookie=AQIC5wM2LY4SfczkxcjsoIVQbGnnqbFrqk8lWxYT1xzFVlE%3D%40AAJTSQACMDI%3D%23^M
    ^M
    <-- [
    HTTP/1.1 200 OK^M
    Server: Sun-Java-System-Web-Server/7.0^M
    Date: Fri, 07 Nov 2008 07:28:53 GMT^M
    Content-type: text/css^M
    Last-modified: Fri, 07 Nov 2008 07:20:29 GMT^M
    Etag: W/"277-4913ec3d"^M
    Content-encoding: gzip^M
    Vary: accept-encoding^M
    Transfer-encoding: chunked^M
    ^M
    165^M
    ^_\213^H^CU\222\301N\3030^L\206\357{
    ^K\256\313\2641!A8q^Z'^N^[/\3406nk-M\252$\355\250\320\336\2354)l\315\245\262^?\307\376?\247\205U#\374\254:T\212M-4UA\302nG\355[\314V\326^DQa\313z\224p \353j\3065<|qK^^>\351^BG\333\242yX\307\322|\222\262^FO\216\253\251Ai\265u^R\272\336u\232\246D\201\345\271v\2667J\314\332\243zQ\270Wp]\365zcp(\320%G\232}^P>\214\232D^X;\222`\254I-f\253^R\266S\324b4e\346\240\263\236^C\333^Xb\341\255\356C\272^Pl'\341)^S\315|9\270\260
    \215\204Wj\343\364f\227\306.\220?H^O^T\270\214\320^G24\304\357\273c\3247\340SoNh\2748R\335kt^Q}\212^R\377\202Hs\352~\303\227pi8\373\373G\330<G'\333%\343f\237\275^V\326)r\302q\335d\210\200\254\240\320\261\345b^T\246I\201\276\203PTZ\207y#\323\372b^]J\315\346\234J\346^G(t\237\205\201\343\366H\335k\371\341&U)G\336'-\373^Ui\255\363&\377~\237\373\334\3548\245B\303^F\224^MS\373\353j\365^K O\2450w^B^M
    0^M
    ^M
    ]

  • Content-Length Header Missing in Http Response

    Hi folks,
    Our application uses JSPs and Servlets. To solve a TCP level probelm, we would like to ensure that each response sent from the WebLogic Server includes a content-length header. All the pages are dynamic and therefore we cannot explicitly set the content-length.
    To ensure that WebLogic has the opportunity to set this header, we have increased the response buffer size by adding a <%@ page buffer="nK" %> header to our JSPs and a response.setBufferSize call to our Servlets. The responses still do not contain a content-length header.
    Is there anything else we can do to get WebLogic to set this header?
    Thanks in advance,
    Santosh

    Anybody?

  • Content-length problem

    After upgraded into 8.1sp2, i met a new problem:
    <BEA-101083> <Connection failure.
    java.net.ProtocolException: Didn't meet stated Content-Length, wrote: '36648'
    bytes instead of stated: '36878' bytes
    <BEA-101104> <Servlet execution in servlet context "ServletContext(id=130945280,name=elogistic,context-path=)"
    failed, java.net.ProtocolException: Didn't meet stated Content-Length, wrote:
    '36648' bytes instead of stated: '36878' bytes..
    what's wrong? why 7.1 does not have such problem?

    For version 8.1 Sp2 this is nothing to worry about.
    As i bet you have not actually had your application behaving differently have you.
    It is a known problem and is fixed in SP3 (Which is now avail).
    For version 6.1...it is probably that you have stuffed something up.

  • Gzip / Content-Length HTTP-Header

    Hello,
    I'm writing an HTTP-Proxyserver, but I don't know how to get the length of a GZIPOutputStream ... I'm compressing the data, if the server does not send gzipped data:
    logger.debug("Encode as GZip data!");
    byte[] BinaryBody = new byte[8192];
    GZIPOutputStream gzipOut = new GZIPOutputStream(client.getOutputStream());
    int length;
    while ((length = in.read(BinaryBody)) != -1)
         gzipOut.write(BinaryBody, 0, length);
         gzipOut.flush();
    gzipOut.close();I often get a Nullpointer exception in the line (while ((length = in.read(BinaryBody)) != -1)
    I think it's because I don't set the Content-Length Header, but I'm not sure.
    greetings,
    Johannes

    Disable the "Use Chunked Streaming Mode" property in HTTP Transport Configuration of your business service. By default it remains enabled.
    Regards,
    Anuj

  • Limiting content length in POST

              Hi all,
              We need to restrict the size of the resume uploaded
              to say, 1 MB and we don't want the error message to come up after the upload is
              completed. We tried to use Weblogic property maxPostSize=xxx but weblogic aborts
              the connection abruptly as soon as it finds the resume size is greater than allowed
              and all user sees is a "Page cannot be displayed" message, we
              need some way to give appropriate message to the user about this, any help on
              this is greatly appreciated.
              Thanks
              

    Maby u try to force it with:
    conn.setRequestProperty ( "Content-Length" ,
                   Integer.toString (requestData.getBytes()));
    for me it does also not work...but u never know
    lemme know if it works
    Fabian

  • Content length is zero

    hello,
    while testing web/adf app, i download a text file. while playback I get "Content length is zero" error.
    I can skip it usiing "ignore/warn" but the point is that I want to get the content to make load on the server.
    Someone would have an idea, please, why, I get null content instead of the proper file ?
    thanks
    Michael

    Hello Michael
    Can you give us more details about your issue?
    Version of OpenScript?
    Type of script? Load test I guess
    Type of module? You ADF most likely
    So you get this error when playing back a scenario where you download locally a file, right? Is that file dynamically generated or fix name?
    It could be a correlation issue, it could a wrong http get...
    Please let us know
    Cheers
    JB

  • Is it possible to use XHTML (static content) whilst writing JSPs in XML?

    Hi Everyone,
    I am currently trying to get my head around the whole XML syntax for JSP. Unfortunately there doesn't appear to be a well rounded tutorial on the net about this so I will lay my questions to rest here.
    Firstly I have managed (with the help of some very kind Java Developer Connection users) to write a JSP page in XML syntax (including the <jsp:root> element, and the like). However even when I follow all of the correct conventions my html content ends up causing the page compilation to fail. The problem is that the html content in my JSPs is being read as XML even though it is being enclosed in <jsp:text> elements. For this reason I am getting compilation failures because of deprecated tags like <br> within my html.
    For this reason I am attempting to switch my static content into XHTML, I figure that this will offer some sort of solution. However when I try to convert my html content into xhtml I end up getting a failure around the DOCTYPE declaration that xhtml is required to use.
    Does anybody out there know if jsp xml syntax and xhtml can be used together, and if so could you please point me in the right direction?
    Thanks for your assistance.
    Regards
    David

    I'm looking into this topic too.
    Here is one article I've found on the web regarding the usage of XML syntax for the JSP document.
    http://www.onjava.com/pub/a/onjava/2001/11/28/jsp_xml.html
    I do know that xhtml requires that your tags be "closed". So for example the <br> tag would look like
    and so on.
    As far as the DOCTYPE tag which gives the XHTML specification via DTD to the browser, you can find examples here...
    http://www.w3.org/TR/xhtml1/#dtds
    You'll find examples for Strict, Transitional, and Frameset XHTML
    I have gotten a failure on the DOCTYPE tag when I have attempted to test offline, because the dtd was inaccessible. But once online it worked.

  • Knowledge Provider (KPro) content-length of document

    hello,
    I need to know where the knowledge provider (kpro) logs or saves the information about the content-length of the document? or in detail: in which table is the length information of a document saved (perhabs in bytes?)?
    thanks for your reply.
    thorsten

    Hi Guys
    Can anyone give a clue on this. We are stuck at this phase.

  • How to display a document content in a JSP page

    Hi friends,
    I am trying to display a document's content in a JSP page after user authentication.For that I mapped a jsp file with extension ".sens" in Content Management SDK manager,and put the file in the directory '/ifs/jsp-bin' of webstarterapp,but it is not working.Please help me to solve the probleb as earliest.
    Regards
    Prasenjit

    under view put a new tag
    <f:view>
    <ui:script url="page.js"/>
    and thats it

  • Java.lang.Exception:Incorrect content-type found text/html

    Dear All,
    While opening a PCR throught MSS, which is PDF based service, I am getting following error.
    java.lang.Exception: Incorrect content-type found 'text/html'.
    com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentRuntimeException: Failed to  UPDATEDATAINPDF     at com.sap.tc.webdynpro.clientserver.uielib.adobe.impl.InteractiveForm.afterHandleActionEvent(InteractiveForm.java:418)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.afterApplicationModification(ClientApplication.java:1132)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.afterApplicationModification(ClientComponent.java:895)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doRespond(WindowPhaseModel.java:573)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:152)
         at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:313)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingPortal(ClientSession.java:733)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:668)
    I have refered previous posts aslo related to this but no solution. Please try to help me.
    <removed_by_moderator>
    Read the "Rules of Engagement"
    Thanks.
    Roshan
    Edited by: Juan Reyes on Mar 31, 2009 3:40 PM

    hi,
    Most probable reson for this issue is the expiry of the password for ADSUser.
       Go to Visual Admin:
       -> server -> service -> security provider service -> user management tab, then select user ADSUser.
       If option 'No password change is required' is not selected, please check it.
    Hope this helps!!

Maybe you are looking for

  • HU Create Problem

    Hi Experts, I am trying to create an uassigned Hu thru BAPI_HU_CREATE by providing the Packaging Material No in the HEADERPROPOSAL-PACK_MAT field.Now post executing the BAPI 'm able to get the HU no but the entry is not reflected in VEKP  and VEPO ta

  • Putting a Flash inside a Flash?

    I'm debating on creating my website on Flash Profession CS6, but I was wondering if there's a way to embed a Flash automatic photo gallery that I have already created into the Flash website. Is that possible? If yes, how do I do it? Also, my site pro

  • Can't update add-ons, install toolbars or new add-ons, get desktop shortcut icons to work, delete desktop shortcut icons, or uninstall Firefox! Help!

    I have Firefox 3.6.3 running on a Toshiba Satellit laptop with Windows XP. I can't update add-ons, install google and yahoo toolbars, get any of the 3 desktop shortcuts to work or delete them, nor uninstall Firefox to try and start over. What a piece

  • Vista Aero Basic = Cursor Lag

    I've had a extremely annoying photoshop issue for a very long time. I was hoping CS4 would eliminate this hideous bug but it's made it marginally worst. My studio makes video games so we often work in 3ds Max 7 & photoshop simultaneously. 3ds Max doe

  • Packing of Material inside Pallets in Handling Units

    Hi All, Let me know me any user exit or BADI to create pallet inside handling units. If there is any give some information about parameters and how to use. I have an urgent requirement to pack material inside pallets in Handling unit in following way