When writing
Java web applications with JSP it's fine to also use Ajax. JSP can be used to generate the HTML of initial page load, and Ajax can be used to update data in the DOM as necessary, avoiding unnecessary whole-page reloads.
JSP can also be used to format HTML to return from an Ajax call.
So it isn't really a question of JSP
or Ajax, but rather how each can be used to best advantage.