File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet to servlet communication does not work in weblogic 9.2.4

 
Sangeetha Davey
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an applet and am communicating to the servlet to create files in the server and client directories.
This is fine in weblogic 9.2. But when I downloaded weblogic 9.2 MP4 (Maintenace pack 4), this throws a stacktrace.
Here is the code:
URL url = new URL(surl);
in = new BufferedReader(new InputStreamReader(url.openStream()));

The stacktrace is: invalid stream header: 0D0A0D0A

The url is something like: http://xxx:7001/esm/esm?flowlet=com.emax.flow.fulfillment.general.M308_OrderListFlowlet&navaction=gridAppletStatus&gridname=M308

If I paste the url into a separate browser it is fine.

This is driving me crazy since this works in weblogic 9.2 So, what changed between weblogic 9.2 and weblogic 9.2.4. I see that the jrockit/java version has changed. Is it something to do with that? Is it a security configuration?
Your help is much appreciated. Thanks in advance.
 
Bal Mark
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Sangeetha,

Did you get anywhere with this? In finding the cause?

I came across the same problem and have had to put in a work around, the problem for me was the applet wasn't using sessionid from its containing page

For the work around, I ended up setting up an applet parameter that's set with the pages jsessionid, then inside the applet, when creating a url, setting the connection myConnection.setRequestProperty("Cookie", "JSESSIONID=" + sessionid);
 
Bal Mark
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hmm instead of doing this, adding the line
<cookie-http-only>false</cookie-http-only>
to the service-descriptor in your weblogic.xml might help

It appears the reason for this is in 9.2 MP4 this is defaulted to true.. which means applets can't take the cookie info when they make requests.
I'm still looking for definative proof on the weblogic/oracle site to confirm this, but this'd also explain how my workaround in previous post worked too.

 
Sangeetha Davey
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks so much. That was it. Thank You Thank you!!!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic