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.
Posts in "JSP"
JSP Directive tutorial for Java Beginners
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
Getting Started with JSP
JSP(Java Server Pages) is a view technology which allows to write template text in client side languages like HTML, CSS, JavaScript and others, instead of Java itself(Which is true for Servlet). To achieve this JSP supports Taglibs(Backed by Java code), Expression Languages and Scriptlet to control theoutput of page. In the end a JSP becomes… Continue reading
Web Application Basics
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
JSP Expression
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.
JSP Basics
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.