开发者

Creating a simple java hash server

开发者 https://www.devze.com 2022-12-31 21:38 出处:网络
Is it possible to create a simple server in Java that returns a response based on a given key? So it would be a simple program, that stores a hashmap and returns the result based on a key provided by

Is it possible to create a simple server in Java that returns a response based on a given key?

So it would be a simple program, that stores a hashmap and returns the result based on a key provided by the client.

What would be the fasted implementation, t开发者_运维问答o have it over HTTP or a socket? The client will be a web based application.


No should describe your environment a little better in order to get a qualified answer. Client is a web based application, thats all we know.

You could provide a servlet and add your hashcode as a request parameter. The servlet will do a lookup and return the requested object using JSON, this can be parsed in your web based application from javascript.

A tutorial for prototype and one for jQuery (which seems more popular).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号