Java is #1 choice for me always when it's possible.
That goes for me too.
But you may be limited by hosting which does not support JSP or by your know-how.
Yeah, we actually had to rent a VPS just to host our java app together with PHP apps. I got another question...
Doesn't AJAX post some security threats? Like the client could send multiple request, cancel it, then send it again and thus gives the server an overload...?