Top.Mail.Ru
July 21st, 2005 - Java developers — LiveJournal
? ?

Java developers

July 21st, 2005

11:57 am - thenetimp - Stupid Simple Question....

Hi Guys,

I haven't touched Java since 2001, and I find myself having to edit a jsp page real quick(something I normally don't do), and I am having a bit of a hard time trying to get what I would think would be easy task to happen. I have a variable that represents a directory path. It's not guaranteed that the it will or won't have a trailing slash I am trying to figure out the best way to detect if the trailing slash is present in the path. Suggestions?

04:10 pm - angrylittlefox - Secure Sockets

Hi there,

I hope I don't sound like too much of a newbie with this, but it's been plaguing me for a while.

I've written several apps using standard Java sockets, and have gotten into the habit of using them in the way the Java tutorial uses them; ie, passing multiple pieces of data in both directions with a single socket, and closing the socket only after the entire data transaction is complete. However, it seems the SSLSocket/SSLServerSocket classes don't like to operate in this manner. With debugging turned on, I can watch my initial 'SYN' data go from client to server, and I see the 'ACK' being encrypted by the server, passing through the network, arriving at the client, and being decrypted. But for some reason, a read() call won't give me the data.

I have tried googling for other examples of SSLSocket usage, but the only results I seem to find are the same "Echo server" example from the Java Tutorial. I get the impression that SSLSocket/SSLServerSockets aren't meant for two-way communication, but I can't find anyone willing to say yes or no either way.

Thoughts/suggestions?

Thanks in advance.
Powered by LiveJournal.com