java - How to send Data from Tomcat Server to Client? -
i need write function gets json via spring , deliver data. case customer sending me filename , im looking in database file , send him data. need little kickstart , can answer me questions:
- do need sockets this?
- what stream should use (its several datatypes likes pictures, documents, pdf....)
- how can identify destination send
you can use response :
string yourdata; jsonwriter writer = new jsonwriter(response.getwriter()); writer.beginobject(); writer.name("data").value(yourdata); writer.endobject(); writer.close();
Comments
Post a Comment