java - Send Data From Servlet To another ServerSocket -


in java project have server class(using serversocket) , client class(using socket). in addition implemented servlet application running on tomacat 8 servlet acts input source(in other words client).

i'd send data filled servlet web page server socket. got data web form using request.getparametermap() command

i use json in order wrap data before sending between client , server. i'd same servlet cant find right way that.

thanks!

as have client class need use effectively. make client code generic simple interface can called anywhere. servlets java classes, can call other class additional work. in case, can use data received in servlet , pass on client send server.

make sure client code should not block servlet long decrease responsiveness. if can client logic in separate thread servlet can respond quickly.


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -