The best option is to include all the logic in your request handler such as Struts action and use Jsp just to display data; otherwise
you will end up writing buggy code. In my application:
http://www.skillipedia.com everything is done inside the struts handlers and jsp will only show the number of purchased items, prices etc...
Viz