Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

JSP consists of Java Code and Java code needs a class and method. How that java code in JSP without declaring class and method works then ?

user-image
Question added by Firoz Ahmad , Software Engineer , Tata Consultancy Service Limited
Date Posted: 2017/04/16

#As we know that jsp has designed to support tagbased programming,so the people who hv basic knowledge of html ,they can also use jsp in webpage development,n if i talk about class ,every jsp is internally translated into servlet ,and every jsp program having 2 phase:-

1)Translation Phase 2)request Processing Phase

=>something like,||browser gives request to-->.jsp page-->jsp pagecompiler-->gives .java(JES source code)-->javac-->gives .class file(Execution phase)-->(response goes to browser)

Hani Muhammad Shawagfeh
by Hani Muhammad Shawagfeh , Full Stack Web Developer , Al AlBayt Unversity

As we know  JSP is JAVA Inside HTML and the SERVLET is HTML Inside JAVA;

so the web server (e.g :APACHE TOMCAT SERVER) compile JSP into servlet (JAVA code ).

in other words  JSP ==>WEB SERVER COMPILATION ==>JAVA CLASS(SERVLET)

 

More Questions Like This