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, to 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).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.