1. JSP
JSP (Javaserverpage) would is supplementary for servlets, rather than be substituted. Because the JSP sloves tow problems of Servlet.such as,first,the HTML tags in servlets all must being enclosed by Java String, Thus,make send HTTP Response become a process complicatedly; Second,all text&html tags must hard-compiling,so even if revise merely for Presentation Layer,we must re-compile the A Pplication.
2. JSP Concept
As we know that, the JSP is essential for servlet,cause it's a servlet.but using JSP is easier than Servlet,they is reasons That JSP, don ' t compile and its Extension, Name is jsp,could edit it with any editor.
JSP Page also running in JSP Container. Usually, Servlet Container also is a JSP Container.eg:Tomcat is a servlet/jsp Container.
JSP ' s Comment (note), implicit object (implicit objects) &three grammar elements. They is directive (Directive), scripting Element (script Element), action (action).
3.JSP Request Process
servlet/jsp Container must do-things at firstly client requires a JSP Page:
(1) Javax.servlet.jsp.JspPage Interface or its sub-interface javax.servelt.jsp.HttpjspPage to transform JSP into a JSP page Implementation class. It would Bo Best,we could know Jsppage is a sub-interface of javax.servlet.servlet,hence,jsppage can every JSP Page become A servlet.the Servlet Class Name is decided on servlet/jsp Container.
(2) If JSP is succeedly transformed into servlet class,then servlet/jsp Container would compile Servlet class.and Container Load&instace Java byte Code,excute it as if treat a common Servlet to operate in a life cycle.
JSP Learning-Jsp&el (Express language) studying Summary