Question: I want to write something in Java that would compute something on the fly. So, I want to have a Java server that can reply to AJAX requests. That's all I need. I want it to be as minimalistic as humanly possible.

If you want a hypothetical scenario, pretend I want to write an adder service. Something to which I can pass the JSON: { "action" : "add", "args": [0, 1] } and get { "sum" : 1 } back. That's all, but I want it on the web. I don't care about security or anything else. So no sessions, no https or anything.

I don't want to set up a server or use some bloated framework. I'm thinking I can accomplish this with JNetPCap and pure old Java, but I would like to get rid of PCap as well. 

I guess I'm asking what in the standard JRE or a very light-weight jar can give me what I'm looking for.

Thank you guys.

Edit: For the purpose of the exercise, imagine that what I want to write should be able to run on anything that has Java installed and has an open port. 

Edit #2: It turns out my entire thought process had a fundamental flaw: If I have a server that only serves JSON there's no way to have a page on the same domain that can safely request that JSON without using JSONP or something. So, I will be using the JLHTTP. Thank you all who participated.

Answer: 
[This is](http://www.freeutils.net/source/jlhttp/) the most lightweight functioning HTTP server written in Java that I've come across so far (39 KB for the whole thing). I've used it for doing integration testing, I have no idea how it would fare as a production server. In particular, I don't know how it handles multiple concurrent requests.
Since AJAX requests/responses rely on HTTP, you're going to have to use some sort of HTTP server. I'd recommend [Jetty](http://docs.codehaus.org/display/JETTY/Embedding+Jetty) as it is pretty light-weight and there seems to be many examples on how to use it.