This discussion is archived
1 Reply Latest reply: Apr 2, 2012 10:12 PM by 164415 RSS

sending over 2048 bytes data to Weblogic using HttpConnection

927650 Newbie
Currently Being Moderated
Hi all,
I cannot send over 2048 bytes from applet to servlet in Weblogic (version 8.1, jdk 1.4). If I send to servlet in Tomcat server (jdk 1.6), it works fine.

URL servleturl = new URL(servlet);
HttpURLConnection servletconnection = (HttpURLConnection) servleturl.openConnection();
servletconnection.setRequestProperty("Content-Type", "application/octet-stream");
BufferedOutputStream out = new BufferedOutputStream(servletconnection.getOutputStream());

byte buf[] = new byte[2000];
while ((bytesread = > -1) {
out.write(buf, 0, bytesread);

int code=servletconnection.getResponseCode();

BufferedReader bufferIn = new BufferedReader(new InputStreamReader(
String inputLine;
while ((inputLine = bufferIn.readLine()) != null)
in.close(); Server returned HTTP response code: 500 for URL: http://xxxx:8081/servlet/TC/SigningServlet

I don't know why ? Please help me!
Thanks and Best Regards,
  • 1. Re: sending over 2048 bytes data to Weblogic using HttpConnection
    164415 Oracle ACE
    Currently Being Moderated
    WebLogic has an option to configure DoS attack prevention with POST:

    You don't seem to be getting the documented response code:

    An HTTP error code 413 (Request Entity Too Large) is sent back to the client.

    So perhaps not. But still worth checking to see if those are set?

    Can I also ask why 8.1? That's very old now, perhaps try a later release if possible.



  • Correct Answers - 10 points
  • Helpful Answers - 5 points