design patterns - Ajax call to a JSP -


i working on web app, extjs makes ajax call jsp, jsp in turn calls java class , returns value , updates in database.

now question is, somehow not feel effective way, discovered servets working , wondering if should make ajax call servlet instead of jsp. there other ways better , optimized. please explain.

thanks, sixthstring

it depends on want returned form ajax call. jsp used generating formatted html. if that's you're looking ajax call, jsp right choice.

if you're looking raw data, might skip jsp template , go straight servlet. recommend using json in case, because it's easy work in javascript.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -