chure abcede wrote:I thought we could just easily call and run a servlet in Jsp line with a Tag.
You actually can -- the <jsp:include> action can call any resource. It's just not considered a good practice. Common practice is to handle all data activity in the controller and to keep the JSP as "dumb" as possible.
what tag should I use or the preparation.
Again, no tag. Any data activity that needs to be performed should be done
before the JSP gets invoked. Have you read
this article which describes page controllers?
setAttributes place inside servlet and forward the response to JSP?
Pretty much. The controller does the data access, places the data into request scope, and the request is forwarded to the JSP which accesses the values via the EL and JSTL.
I tried it but I guess its only applicable if your passing a variable from a servlet to JSP.
What do mean by "only applicable"? This is always applicable when using accepted practices.