开发者

What do we need to implement an ajax request servlet-side?

I'm using jquery, and I want to access some data on my server using ajax. The server is running google app engine (which is just a bunch of servlets). Can someone point me to a sort of tutorial on how to implement a servlet that can talk to an ajax request (ideally made from jquery)?

I think I just need to create a servlet, and the jquery script uses the url for the servlet, nothing else, but I am开发者_如何学Python quite new and ignorant.

Thanks


It is exactly the same as any other servlet.

You get an HTTP request and you make an HTTP response.

The only difference is that you might want to output XML or JSON instead of HTML (in which case, set your Content-Type and find an XML or JSON library that you like).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜