As you JSP will compiled in Java file in the end and everything written in JSP will fall under a method(Service) in generated java file. What if you want to add Java code in JSP which should directly be added inside service method in generated file. To fullfil this criteria JSP declaration will be used.
Directive is a type of Statement which can be used to give instruction to container about doing something special at @ page transalation time. Directive can be divided in three types Page Include Taglib
Different Actors in Web application There are different actors which comes into picture of web application. End User Web Client(Browser Application) Server(Web Server / Application Server) Actual Page requested on Server
Expression is a type of JSP element which is used to embed Java code in JSP. Container takes the argument of expression (everything written between <%= %>) and put it in as the argument to PrintWriter out which will print on JSP.
A JSP becomes a servlet. You don’t directly create servlet, it is generated by Container only. Container takes what you have written in your JSP, translates it into a servlet class source file then compiles that into a java servlet class. And this code would execute in the same as it were written in java file.