Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Interesting Problem

 
Matt DeLacey
Ranch Hand
Posts: 318
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am experiencing an interesting problem. I am having an applet talk to a Proxy Server. They talk back and forth passing Strings. No problem, it works fine. In appletviewer, it behaves just as I like. However, in Netscape, it connects and goes through all the motions, but the string is a null string? Does this ring any bells with anyone?? Before I get a flood of responses saying it has something to do with security policy, it does not. I catch all exceptions and there are none plus it is opening the socket, connecting, and all successfuly, it's just that the string being passed is null.
Any ideas would be greatly appreciated.
With Respect,
matt
 
asheet anand
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
YOU SHOULD DOWNLOAD HTML CONVERTER FROM THE SUN SITE
AND THAT WILL SOLVE YOUR PROBLEM BECAUSE THEN YOUR BROWSER
WILL USE SUN' JVM TO RUN THE APPLET WHICH DOES'NT HAVE ANY
SECURITY EXCEPTIONS.
ASHEET
 
Rahul Rathore
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Matt
Netscape appears to be quite rotten. I have read so many posts about applets working perfectly on IE and going kaput on Netscape. And rarely is a solution found (at least not in the threads). Is yours working on IE?
Maybe somebody could help if you further clarify your problem. What do you mean by saying that String is a null String? You mean what is received by server? or by client? or both? Maybe you could post the source code.
 
Matt DeLacey
Ranch Hand
Posts: 318
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, can't post the source, it's company confidential, wish I could because I'm sure someone could diagnose it then. When I say null string I just mean when I print the string out on the other end it looks like The string received was:
It doesn't actually print null so I guess the string is "". I need to test it in IE....good idea.
With Respect,
Matt
 
Rahul Rathore
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just some wild shots (without really knowing what I am talking about):-
If you are using URL/URLConnection to connect to web-server, then did you use URLEncoder.encode() to encode the string values. And URLDecoder.decode() to decode the values on the server side.
If you are opening an stream for doing output, from the URLConnection object did you do flush(), close() to the stream. I read somewhere that the URLConnection class buffers all the contents that you write to the output stream, because it must calculate the content length before sending data to the web-server.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic