Which way to handle changing JSP with AJAX
Yes, it's yet another AJAX question...
I seem to see two different ways of handling the changing of data on a jsp page:
1) Some people have logic built into a jsp, i.e. based on a certain variable in the request, display one of two divs.
2) Others have only one div on the page, and manually change its content in java by getting the DOM element and changing it.
Are these two methods both equally practical? Is one preferred? Does it depend on the situation? Which situation would call for one over the other?
Thanks for the help, eager to learn more and am getting confused by these two different methods.

