>Can a JSP be used as controllor in MVC architecture
Yes it can be.
With a JSP you can do anything a
servlet can do.
However what would be the point?
A controllers purpose in life is to look at the request, and then dispatch it to the appropriate handler.
A JSPs purpose in life is to produce an html page for display.
While you CAN use a JSP for a simple controller, I don't see anything about JSPs that recommend it for the job.
If you are writing scriptlet code - why isn't it in a servlet?
I suppose the <jsp:forward>, <jsp:include> tags combined with the some conditional logic could provide a controller, but only really for the simplest of controllers.
Bottom line: yes you
can use a JSP for a controller, but there are more appropriate alternatives. Use the right tool for the right job.