• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

using sockets from within my servlet

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a servlet that connects to a legacy server via a socket connection. it then reads/writes over this socket. It works fine in Tomcat, but I've ported the servlet over to Websphere and I can't seem to write to the socket. It connects just fine, but when I go to Write, the server never reads anything and I don't have any errors.

The code is pretty simple socket stuff. This part lives in my servlet:


This code lives in my Server which is just a POJO:


Like I said, I don't hit any exceptions. The servlet sends off his message in the write, but the server never gets anything to read in the buffer.

Is this a problem in Websphere? Do I need to configure anything?

thanks
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it possible that the output flush method must be called?
How does the sever end determine that it has gotten a complete transmission?
Bill
 
Lasagna is spaghetti flvored cake. Just like this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic