title
What is JSP | Introduction to JSP (Java Server Pages) Tutorial for Beginners | Edureka

description
( Java Training - https://www.edureka.co/java-j2ee-training-course ) JSP is a technology that is used to create web application just like Servlet technology. JSP technology makes available all the dynamic capabilities of Java Servlet technology but provides a more natural approach to creating static content. JSP has various advantages over Servelet technology. To know more about JSP watch this video. It covers following topics : 1.What is JSP ? 2.JSP execution Procedure 3.Advantages of JSP over HTML 4.JSP Life Cycle 5.JSP files Execution Procedure (In Eclipse) 6.JSP Tags Here are the related posts: http://www.edureka.co/blog/free-webinar-on-hadoop-for-java-professionals/?utm_source=youtube&utm_medium=referral&utm_campaign=jsp-intro http://www.edureka.co/blog/hadoop-and-java-job-trends/?utm_source=youtube&utm_medium=referral&utm_campaign=jsp-intro http://www.edureka.co/blog/methods-and-method-overloading-in-java/?utm_source=youtube&utm_medium=referral&utm_campaign=jsp-intro Edureka is a New Age e-learning platform that provides Instructor-Led Live, Online classes for learners who would prefer a hassle free and self paced learning environment, accessible from any part of the world. The topics related to JSP have extensively been covered in our 'JAVA/J2EE & SOA' course. For more information, please write back to us at sales@edureka.co or call us at IND: 9606058406 / US: 18338555775 (toll free).

detail
{'title': 'What is JSP | Introduction to JSP (Java Server Pages) Tutorial for Beginners | Edureka', 'heatmap': [{'end': 419.282, 'start': 354.502, 'weight': 0.762}, {'end': 858.508, 'start': 826.998, 'weight': 0.842}, {'end': 1165.657, 'start': 1141.62, 'weight': 0.801}], 'summary': 'Provides an introduction to jsp, emphasizing its ability to simplify file writing and merge html and java code, highlighting its server-side technology, compilation process, and use in mvc architecture.', 'chapters': [{'end': 273.787, 'segs': [{'end': 131.184, 'src': 'embed', 'start': 16.738, 'weight': 0, 'content': [{'end': 26.543, 'text': 'Now, JSP, okay, when you say HTML plus JSP, sorry, Java code, which becomes JSP.', 'start': 16.738, 'duration': 9.805}, {'end': 39.168, 'text': 'In the previous example, like in the previous, like in the module that is servlets, how many files you have to write to execute a servlet??', 'start': 27.623, 'duration': 11.545}, {'end': 41.649, 'text': 'You have to write three files minimum, correct?', 'start': 39.549, 'duration': 2.1}, {'end': 42.59, 'text': 'What are they?', 'start': 42.17, 'duration': 0.42}, {'end': 54.231, 'text': 'They are your HTML code, your web.xml and Java file.', 'start': 49.73, 'duration': 4.501}, {'end': 59.593, 'text': 'Correct? Now, the next technology of a servlet is JSP.', 'start': 54.551, 'duration': 5.042}, {'end': 62.014, 'text': 'What they did is they removed everything.', 'start': 59.633, 'duration': 2.381}, {'end': 66.835, 'text': "They said, why I should write three files? I'll write only one file.", 'start': 62.694, 'duration': 4.141}, {'end': 70.336, 'text': 'See, the UI portion is in HTML.', 'start': 67.515, 'duration': 2.821}, {'end': 73.537, 'text': 'Java portion, the business logic, is in Java file.', 'start': 70.776, 'duration': 2.761}, {'end': 84.399, 'text': "Why don't I combine these two? Now HTML and Java file is combined and you need not write web.xml.", 'start': 74.016, 'duration': 10.383}, {'end': 91.14, 'text': 'So all the three files are merged into a single file that is called as JSP.', 'start': 84.739, 'duration': 6.401}, {'end': 95.461, 'text': 'JSP stands for Java Server Pages.', 'start': 91.98, 'duration': 3.481}, {'end': 101.043, 'text': 'So like the Java has got .', 'start': 98.582, 'duration': 2.461}, {'end': 102.323, 'text': 'java extension.', 'start': 101.043, 'duration': 1.28}, {'end': 109.14, 'text': 'dot XML as the XML for the XML file, JSP has got the dot JSP as the extension.', 'start': 102.779, 'duration': 6.361}, {'end': 115.381, 'text': 'So see, JSP is nothing but a servlet only.', 'start': 111.1, 'duration': 4.281}, {'end': 118.262, 'text': 'You will come to know in a short while what is JSP.', 'start': 115.401, 'duration': 2.861}, {'end': 127.523, 'text': 'The JSP file has to be executed on the server, either application server or web server.', 'start': 119.642, 'duration': 7.881}, {'end': 131.184, 'text': 'The web server is like Apache Tomcat.', 'start': 128.502, 'duration': 2.682}], 'summary': 'Jsp combines html and java into one file, eliminating the need for web.xml, resulting in a single jsp file with .jsp extension.', 'duration': 114.446, 'max_score': 16.738, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_8_kQz1m-0U/pics/_8_kQz1m-0U16738.jpg'}, {'end': 273.787, 'src': 'embed', 'start': 212.304, 'weight': 3, 'content': [{'end': 214.665, 'text': 'UI purpose you can use HTML.', 'start': 212.304, 'duration': 2.361}, {'end': 218.308, 'text': 'Java is used for business logic.', 'start': 215.286, 'duration': 3.022}, {'end': 223.231, 'text': 'that is what project you want to develop, what the code it should contain right?', 'start': 218.308, 'duration': 4.923}, {'end': 225.893, 'text': 'And Java can connect to the database.', 'start': 223.632, 'duration': 2.261}, {'end': 239.813, 'text': 'Okay Now, So JSP is used for multi-purpose, both for UI as well as the middle layer, right? Completely end-to-end.', 'start': 226.754, 'duration': 13.059}, {'end': 246.559, 'text': 'See, if you just have JSP, you can develop end-to-end project right?', 'start': 239.853, 'duration': 6.706}, {'end': 249.262, 'text': 'You can develop middle tier, you can develop using JDBC.', 'start': 246.579, 'duration': 2.683}, {'end': 251.964, 'text': 'you can connect to the database and get everything.', 'start': 249.262, 'duration': 2.702}, {'end': 255.047, 'text': 'So if you know JSP, you can do a complete project.', 'start': 252.004, 'duration': 3.043}, {'end': 261.538, 'text': 'But right now in the industry JSP is used for UI, user interface.', 'start': 256.954, 'duration': 4.584}, {'end': 264.78, 'text': 'Predominantly it is used for user interface.', 'start': 261.918, 'duration': 2.862}, {'end': 273.787, 'text': 'Even JSF is in the market which is something very similar to Struts.', 'start': 269.004, 'duration': 4.783}], 'summary': 'Java and jsp are used for end-to-end development, including ui and middle layer, with jsp predominantly for ui in the industry.', 'duration': 61.483, 'max_score': 212.304, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_8_kQz1m-0U/pics/_8_kQz1m-0U212304.jpg'}], 'start': 16.738, 'title': 'Jsp: combining html and java', 'summary': 'Discusses simplification in file writing and merging of html and java code into a single file in jsp, which removes the need to write three separate files for execution. it introduces jsp as a server-side technology with the .jsp extension, executed on application or web servers, combining html and java code for multi-purpose use, predominantly for ui, and compares it to html and java.', 'chapters': [{'end': 91.14, 'start': 16.738, 'title': 'Jsp: combining html and java', 'summary': 'Discusses the simplification in file writing and merging of html and java code into a single file in jsp, which removes the need to write three separate files for execution.', 'duration': 74.402, 'highlights': ['JSP simplifies file writing by combining HTML and Java code into a single file, eliminating the need to write three separate files for execution.', 'In JSP, the UI portion is in HTML, and the business logic is in a Java file, merging both into one file and removing the need to write web.xml.', 'Previous technology required writing three files (HTML code, web.xml, and Java file) to execute a servlet, whereas JSP simplifies it by merging these three into a single file.']}, {'end': 273.787, 'start': 91.98, 'title': 'Introduction to jsp', 'summary': 'Introduces jsp as a server-side technology with the .jsp extension, executed on application or web servers, combining html and java code for multi-purpose use, predominantly for ui, and compares it to html and java.', 'duration': 181.807, 'highlights': ['JSP is a server-side technology with the .jsp extension, executed on application or web servers, combining HTML and Java code for multi-purpose use, predominantly for UI, and used for user interface in the industry.', 'JSP is used for multi-purpose, both for UI as well as the middle layer, enabling the development of end-to-end projects and connecting to the database using JDBC.', 'HTML is for display purposes, while Java is used for business logic and connecting to the database, whereas JSP serves both UI and middle layer purposes.']}], 'duration': 257.049, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_8_kQz1m-0U/pics/_8_kQz1m-0U16738.jpg', 'highlights': ['JSP simplifies file writing by combining HTML and Java code into a single file, eliminating the need to write three separate files for execution.', 'JSP is a server-side technology with the .jsp extension, executed on application or web servers, combining HTML and Java code for multi-purpose use, predominantly for UI, and used for user interface in the industry.', 'In JSP, the UI portion is in HTML, and the business logic is in a Java file, merging both into one file and removing the need to write web.xml.', 'JSP is used for multi-purpose, both for UI as well as the middle layer, enabling the development of end-to-end projects and connecting to the database using JDBC.', 'Previous technology required writing three files (HTML code, web.xml, and Java file) to execute a servlet, whereas JSP simplifies it by merging these three into a single file.', 'HTML is for display purposes, while Java is used for business logic and connecting to the database, whereas JSP serves both UI and middle layer purposes.']}, {'end': 527.106, 'segs': [{'end': 329.317, 'src': 'embed', 'start': 274.248, 'weight': 0, 'content': [{'end': 278.691, 'text': 'It follows the NVC architecture but JSF is more of a front end.', 'start': 274.248, 'duration': 4.443}, {'end': 288.04, 'text': "okay, now let's look at how exactly the jsp is getting compiled, right?", 'start': 281.556, 'duration': 6.484}, {'end': 289.541, 'text': 'so what is jsp file?', 'start': 288.04, 'duration': 1.501}, {'end': 291.022, 'text': 'how does it compile?', 'start': 289.541, 'duration': 1.481}, {'end': 292.503, 'text': 'when you compile what happens?', 'start': 291.022, 'duration': 1.481}, {'end': 299.107, 'text': 'okay, now i will develop a file called hello.jsp.', 'start': 292.503, 'duration': 6.604}, {'end': 304.71, 'text': 'now, if i compile the jsp, what it generates is there is a jsp compiler.', 'start': 299.107, 'duration': 5.603}, {'end': 307.932, 'text': 'what it generates is it generates a servlet file.', 'start': 304.71, 'duration': 3.222}, {'end': 313.309, 'text': 'for me, so that means So a JSP file is a servlet file only.', 'start': 307.932, 'duration': 5.377}, {'end': 318.495, 'text': 'Rather than writing three files and writing a complicated code, we are writing JSP.', 'start': 313.389, 'duration': 5.106}, {'end': 323.521, 'text': 'So when I write the JSP, it gets compiled to a servlet file only.', 'start': 319.056, 'duration': 4.465}, {'end': 327.417, 'text': 'That servlet file is again what file?', 'start': 325.136, 'duration': 2.281}, {'end': 329.317, 'text': 'It is Java file, only correct?', 'start': 327.557, 'duration': 1.76}], 'summary': 'Jsp files compile to servlet files, simplifying code and architecture.', 'duration': 55.069, 'max_score': 274.248, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_8_kQz1m-0U/pics/_8_kQz1m-0U274248.jpg'}, {'end': 462.299, 'src': 'heatmap', 'start': 354.502, 'weight': 1, 'content': [{'end': 358.164, 'text': "When you again, I'll explain JSP file.", 'start': 354.502, 'duration': 3.662}, {'end': 364.347, 'text': 'if you compile JSP, if you, by using JSP compiler, it gets converted to a servlet file.', 'start': 358.164, 'duration': 6.183}, {'end': 368.669, 'text': 'Okay So that servlet file is a Java file.', 'start': 365.347, 'duration': 3.322}, {'end': 373.931, 'text': 'That Java file has to be compiled and finally it gets into dot class file.', 'start': 369.109, 'duration': 4.822}, {'end': 388.537, 'text': 'Now if you look at the detail, the execution procedure that is what I said, JSP file using JSP translator it converts into the servlet file that is .', 'start': 375.97, 'duration': 12.567}, {'end': 390.518, 'text': 'java file.', 'start': 388.537, 'duration': 1.981}, {'end': 394.2, 'text': 'Java file is compiled and it generates .', 'start': 390.918, 'duration': 3.282}, {'end': 394.7, 'text': 'class file.', 'start': 394.2, 'duration': 0.5}, {'end': 404.866, 'text': 'The class file is loaded into the memory and executed by JRE and that is how JSP gets executed.', 'start': 395.421, 'duration': 9.445}, {'end': 412.759, 'text': 'Okay, advantages of JSP over HTML.', 'start': 409.238, 'duration': 3.521}, {'end': 419.282, 'text': 'Okay, so basically these are the advantages of HTML, sorry JSP.', 'start': 414.78, 'duration': 4.502}, {'end': 429.646, 'text': 'As in servlet, you need not write the code separately for HTML and Java separately, you can combine both of them.', 'start': 421.063, 'duration': 8.583}, {'end': 436.09, 'text': 'Okay. so if you look at, like you know, the servlets is only for a business logic, right?', 'start': 431.047, 'duration': 5.043}, {'end': 440.432, 'text': 'What project has to be done has to be specified in servlets.', 'start': 436.21, 'duration': 4.222}, {'end': 445.435, 'text': 'And, as in JSP right, you can use it for front-end also.', 'start': 440.993, 'duration': 4.442}, {'end': 454.681, 'text': 'that is UI or user interface right, as it has HTML file, and the business logic as it has Java file.', 'start': 445.435, 'duration': 9.246}, {'end': 458.563, 'text': 'JSP is a combination of HTML and Java.', 'start': 454.781, 'duration': 3.782}, {'end': 462.299, 'text': 'Look at the complexity right?', 'start': 460.316, 'duration': 1.983}], 'summary': 'Jsp files are converted to servlets, then compiled to .class files, loaded into memory, and executed by jre. advantages of jsp over html include combining html and java, and using it for front-end ui.', 'duration': 104.135, 'max_score': 354.502, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_8_kQz1m-0U/pics/_8_kQz1m-0U354502.jpg'}, {'end': 527.106, 'src': 'embed', 'start': 497.762, 'weight': 4, 'content': [{'end': 506.718, 'text': 'bring down the Apache Tomcat, then bring up Apache Tomcat and then run the program, because the dot class file has to be loaded on the server.', 'start': 497.762, 'duration': 8.956}, {'end': 510.139, 'text': 'Then only it is available.', 'start': 507.998, 'duration': 2.141}, {'end': 514.701, 'text': 'Then only server can execute that and give it to the client.', 'start': 510.539, 'duration': 4.162}, {'end': 518.542, 'text': 'Now JSP is not like that.', 'start': 517.042, 'duration': 1.5}, {'end': 523.083, 'text': 'If you write once, it gets loaded and executed.', 'start': 519.383, 'duration': 3.7}, {'end': 527.106, 'text': 'If you modify, you need not bring down the server and all those things.', 'start': 523.424, 'duration': 3.682}], 'summary': 'Apache tomcat requires bringing down and up to load dot class file, while jsp allows modification without server restart.', 'duration': 29.344, 'max_score': 497.762, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_8_kQz1m-0U/pics/_8_kQz1m-0U497762.jpg'}], 'start': 274.248, 'title': 'Jsp compilation and execution', 'summary': 'Delves into jsp compilation, highlighting the conversion to servlet files, advantages over html, and differences from servlets, simplifying development and emphasizing dynamic compilation and execution without server downtime.', 'chapters': [{'end': 329.317, 'start': 274.248, 'title': 'Jsp compilation and nvc architecture', 'summary': 'Discusses the compilation process of jsp files, highlighting that jsp files are compiled into servlet files which are essentially java files, simplifying the development process and providing insight into the structure of jsf architecture.', 'duration': 55.069, 'highlights': ['JSP files are compiled into servlet files, simplifying the development process and avoiding the need to write multiple complicated files.', 'Understanding the process of JSP compilation, including the generation of servlet files and their relationship to Java files.', 'Insight into the NVC architecture and the role of JSF as a front end in the development process.']}, {'end': 462.299, 'start': 329.737, 'title': 'Execution and advantages of jsp over html', 'summary': 'Explains the process of jsp execution, highlighting the conversion to servlet files and the advantages of jsp over html, including the combination of html and java in jsp, eliminating the need to write separate code for html and java in servlets.', 'duration': 132.562, 'highlights': ['The process of JSP execution involves the conversion of JSP files to servlet files through a JSP translator, which are then compiled into .class files and executed by JRE.', 'Advantages of JSP over HTML include the combination of HTML and Java in JSP, eliminating the need to write separate code for HTML and Java in servlets, providing a more efficient and integrated approach.', 'In JSP, both the UI or user interface (HTML) and the business logic (Java) can be incorporated, offering a more comprehensive and versatile solution compared to servlets, which are primarily focused on business logic.']}, {'end': 527.106, 'start': 463.14, 'title': 'Servlets vs. jsp', 'summary': 'Introduces the differences between writing servlets and jsp, highlighting the complexities of servlets, the ease of writing jsp, and the dynamic compilation process, emphasizing the advantages of jsp in terms of modification and execution without the need to bring down the server.', 'duration': 63.966, 'highlights': ['JSP is very easy to write, compared to servlets.', 'Servlets require bringing down and bringing up the server for modification, while JSP does not have this requirement.', 'Servlets need to be recompiled and reloaded for modifications, whereas JSP gets loaded and executed without the need to bring down the server.']}], 'duration': 252.858, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_8_kQz1m-0U/pics/_8_kQz1m-0U274248.jpg', 'highlights': ['JSP files are compiled into servlet files, simplifying the development process and avoiding the need to write multiple complicated files.', 'Advantages of JSP over HTML include the combination of HTML and Java in JSP, eliminating the need to write separate code for HTML and Java in servlets, providing a more efficient and integrated approach.', 'In JSP, both the UI or user interface (HTML) and the business logic (Java) can be incorporated, offering a more comprehensive and versatile solution compared to servlets, which are primarily focused on business logic.', 'The process of JSP execution involves the conversion of JSP files to servlet files through a JSP translator, which are then compiled into .class files and executed by JRE.', 'Servlets require bringing down and bringing up the server for modification, while JSP does not have this requirement.', 'Understanding the process of JSP compilation, including the generation of servlet files and their relationship to Java files.']}, {'end': 926.381, 'segs': [{'end': 558.381, 'src': 'embed', 'start': 527.406, 'weight': 0, 'content': [{'end': 530.107, 'text': "Just refresh the browser, that's enough.", 'start': 527.406, 'duration': 2.701}, {'end': 532.608, 'text': "So it's a dynamic compilation.", 'start': 531.128, 'duration': 1.48}, {'end': 536.19, 'text': 'At runtime, it gets compiled.', 'start': 534.349, 'duration': 1.841}, {'end': 543.883, 'text': 'So JSP is used for three-tier architecture and two-tier architecture.', 'start': 538.214, 'duration': 5.669}, {'end': 553.517, 'text': 'So the three-tier architecture means that you have Frontend, middle layer, and backend layer.', 'start': 544.384, 'duration': 9.133}, {'end': 558.381, 'text': 'What do you mean by frontend? The user interface, what will be displayed to the user.', 'start': 553.657, 'duration': 4.724}], 'summary': 'Jsp used for dynamic compilation in three-tier architecture and two-tier architecture.', 'duration': 30.975, 'max_score': 527.406, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_8_kQz1m-0U/pics/_8_kQz1m-0U527406.jpg'}, {'end': 654.471, 'src': 'embed', 'start': 622.909, 'weight': 1, 'content': [{'end': 627.571, 'text': 'So if I just want to modify one screen, it is only in a single layer.', 'start': 622.909, 'duration': 4.662}, {'end': 632.493, 'text': 'Rather, I have a separate module for each operation.', 'start': 628.792, 'duration': 3.701}, {'end': 634.795, 'text': 'It is more easy to develop.', 'start': 632.694, 'duration': 2.101}, {'end': 641.427, 'text': "We don't know if we modify UI, it may impact the business logic also.", 'start': 637.086, 'duration': 4.341}, {'end': 649.11, 'text': 'We may be using the same code also, same file itself, right? Okay, then we have something called model view controller.', 'start': 641.547, 'duration': 7.563}, {'end': 654.471, 'text': 'The model is for the data right?', 'start': 652.211, 'duration': 2.26}], 'summary': 'Separate modules for each operation, easier development, potential impact on business logic when modifying ui.', 'duration': 31.562, 'max_score': 622.909, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_8_kQz1m-0U/pics/_8_kQz1m-0U622909.jpg'}, {'end': 858.508, 'src': 'heatmap', 'start': 808.1, 'weight': 2, 'content': [{'end': 813.605, 'text': 'The logic tier, here we make logical decisions and perform basic computation.', 'start': 808.1, 'duration': 5.505}, {'end': 820.311, 'text': 'It is a logic tier which transfers data between presentation tier and data tier where information is stored.', 'start': 814.145, 'duration': 6.166}, {'end': 825.096, 'text': 'Clear tier architecture increases performance, scalability.', 'start': 820.752, 'duration': 4.344}, {'end': 839.836, 'text': "Okay, now let's look at See in the servlet we have, in the life cycle of a servlet we have three methods that is init, service and destroy.", 'start': 826.998, 'duration': 12.838}, {'end': 842.158, 'text': 'The init method is called.', 'start': 840.357, 'duration': 1.801}, {'end': 851.243, 'text': 'when the servlet is loaded into the memory and for every request from the user, the service method is called.', 'start': 842.158, 'duration': 9.085}, {'end': 858.508, 'text': 'and just before services like in a servlet is removed from the memory, the destroy method is called.', 'start': 851.243, 'duration': 7.265}], 'summary': 'Logic tier transfers data, servlet has init, service, and destroy methods.', 'duration': 31.736, 'max_score': 808.1, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_8_kQz1m-0U/pics/_8_kQz1m-0U808100.jpg'}], 'start': 527.406, 'title': 'Jsp, mvc, and servlet lifecycle', 'summary': 'Covers the use of jsp in three-tier and two-tier architectures, benefits of mvc architecture, and details of servlet and jsp lifecycles, including components, methods, and advantages of three-tier architecture.', 'chapters': [{'end': 621.848, 'start': 527.406, 'title': 'Jsp for three-tier and two-tier architectures', 'summary': 'Discusses the use of jsp for three-tier and two-tier architectures, where three-tier architecture involves frontend, middle layer, and backend layer, while two-tier architecture combines frontend and business logic in a single layer, with the industry not recommending this approach due to tight coupling.', 'duration': 94.442, 'highlights': ['JSP is used for three-tier architecture and two-tier architecture, with three-tier architecture involving frontend, middle layer, and backend layer.', 'In three-tier architecture, the frontend refers to the user interface, the middle layer comprises the logic of the project, and the backend is the database layer.', 'Two-tier architecture combines the frontend and business logic in a single layer, with the backend layer being the database, but this approach is not recommended by the industry due to tight coupling.']}, {'end': 760.614, 'start': 622.909, 'title': 'Understanding model view controller architecture', 'summary': 'Discusses the benefits of using separate modules in the model view controller architecture, making it easier to develop and modify ui without impacting business logic. it also explains the components of mvc and their respective roles, such as model for data and business logic, view for user display, and controller for centralized control.', 'duration': 137.705, 'highlights': ['Separate modules in the model view controller architecture make it easier to develop and modify UI without impacting business logic. Using separate modules in MVC simplifies UI modification and development, reducing the risk of impacting business logic. This approach enhances development efficiency and minimizes potential errors.', 'Explains the components of MVC, such as model for data and business logic, view for user display, and controller for centralized control. The discussion provides a clear understanding of the components of MVC, highlighting the roles of model, view, and controller in managing data, user interface, and centralized control, respectively.', 'Clarification on the role of controller in servlets and its relation to model and view in MVC. The chapter elucidates the role of the controller in servlets, emphasizing its relationship to the model and view in the MVC architecture. This explanation enhances comprehension of how servlets fit into the MVC framework.']}, {'end': 926.381, 'start': 760.614, 'title': 'Three-tier architecture and servlet lifecycle', 'summary': 'Discusses the three-tier architecture, explaining its components and advantages, and then delves into the lifecycle of a servlet and jsp, detailing the methods and their execution. the three-tier architecture involves a presentation tier, logic tier, and data tier, enhancing performance and scalability. the servlet lifecycle includes three methods: init, service, and destroy, while jsp is essentially similar to servlet, providing additional features for combining html and java files.', 'duration': 165.767, 'highlights': ['The three-tier architecture involves a presentation tier, logic tier, and data tier, enhancing performance and scalability. Explains the components and benefits of the three-tier architecture.', 'The servlet lifecycle includes three methods: init, service, and destroy, while JSP is essentially similar to servlet, providing additional features for combining HTML and Java files. Details the methods and execution in the servlet lifecycle, highlighting the similarity between JSP and servlet.']}], 'duration': 398.975, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_8_kQz1m-0U/pics/_8_kQz1m-0U527406.jpg', 'highlights': ['JSP is used for three-tier architecture and two-tier architecture, with three-tier architecture involving frontend, middle layer, and backend layer.', 'Separate modules in the model view controller architecture make it easier to develop and modify UI without impacting business logic.', 'The three-tier architecture involves a presentation tier, logic tier, and data tier, enhancing performance and scalability.']}, {'end': 1418.456, 'segs': [{'end': 1000.551, 'src': 'embed', 'start': 968.536, 'weight': 0, 'content': [{'end': 977.461, 'text': 'Now, you will have directories like src, webcontent, webinf, lib, all these directories will be there.', 'start': 968.536, 'duration': 8.925}, {'end': 979.762, 'text': 'Now, the JSP files.', 'start': 977.941, 'duration': 1.821}, {'end': 983.444, 'text': 'Okay, I will compare the servlet and JSP.', 'start': 980.042, 'duration': 3.402}, {'end': 987.706, 'text': 'So, you have three files in servlet.', 'start': 984.324, 'duration': 3.382}, {'end': 993.708, 'text': 'One is HTML file, the web.xml file and the Java file.', 'start': 988.186, 'duration': 5.522}, {'end': 1000.551, 'text': 'The HTML file will have the UI which is placed in web content directory.', 'start': 994.028, 'duration': 6.523}], 'summary': 'Comparison between servlet and jsp files, with 3 files in servlet.', 'duration': 32.015, 'max_score': 968.536, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_8_kQz1m-0U/pics/_8_kQz1m-0U968536.jpg'}, {'end': 1165.657, 'src': 'heatmap', 'start': 1025.718, 'weight': 2, 'content': [{'end': 1028.702, 'text': 'you have to put it in SRC directly, those Java files.', 'start': 1025.718, 'duration': 2.984}, {'end': 1033.053, 'text': 'Now, all the files are combined into one file as .', 'start': 1029.13, 'duration': 3.923}, {'end': 1039.617, 'text': 'jsp file, the HTML, web.xml, all those things are combined into one class, one file, that is .', 'start': 1033.053, 'duration': 6.564}, {'end': 1040.318, 'text': 'jsp file.', 'start': 1039.617, 'duration': 0.701}, {'end': 1044.762, 'text': 'The jsp file has to be placed under web content directory.', 'start': 1040.759, 'duration': 4.003}, {'end': 1056.965, 'text': 'So, what you have to do is after writing your JSP file, click on the JSP file, right click on it, you select as run as, then specify run on server.', 'start': 1045.942, 'duration': 11.023}, {'end': 1067.008, 'text': 'What exactly it does? Whichever the server is attached with, like either Tomcat or GlassFish or WebLogic or WebSphere, anything, it runs on it.', 'start': 1057.305, 'duration': 9.703}, {'end': 1071.989, 'text': "And one more thing is, I'll show you.", 'start': 1069.788, 'duration': 2.201}, {'end': 1133.354, 'text': 'Okay, what you have is in Eclipse, you go to Windows, actually you have an option of choosing where your web output should be displayed.', 'start': 1122.105, 'duration': 11.249}, {'end': 1141.38, 'text': 'You can select internal browser, you can select the external browsers like IE, Safari, Opera, everything.', 'start': 1134.254, 'duration': 7.126}, {'end': 1143.642, 'text': 'But for that you have to configure.', 'start': 1141.62, 'duration': 2.022}, {'end': 1152.01, 'text': 'Make sure that you are in Java EE perspective.', 'start': 1149.269, 'duration': 2.741}, {'end': 1165.657, 'text': "I want to ask you one more question, fundamental question, that is, everybody installs Eclipse in J2EE mode, right? I'm sure it is yes for everyone.", 'start': 1155.312, 'duration': 10.345}], 'summary': 'Combine java, html, and web.xml files into one .jsp file, place it in web content directory, and run on server for various environments in java ee perspective.', 'duration': 126.292, 'max_score': 1025.718, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_8_kQz1m-0U/pics/_8_kQz1m-0U1025718.jpg'}, {'end': 1317.172, 'src': 'embed', 'start': 1281.863, 'weight': 6, 'content': [{'end': 1289.669, 'text': 'When you are developing the code right, you will not every time switching over to another browser right.', 'start': 1281.863, 'duration': 7.806}, {'end': 1293.953, 'text': 'it is very time consuming and you have to see alt tab, alt tab, control tab and all.', 'start': 1289.669, 'duration': 4.284}, {'end': 1301.82, 'text': 'So to avoid seeing your code, in two places you use the internal browser.', 'start': 1294.474, 'duration': 7.346}, {'end': 1315.911, 'text': "Okay, now let's move on.", 'start': 1314.75, 'duration': 1.161}, {'end': 1317.172, 'text': "That's what it is.", 'start': 1316.472, 'duration': 0.7}], 'summary': 'Efficient coding avoids constant browser switching, saving time and reducing distractions.', 'duration': 35.309, 'max_score': 1281.863, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_8_kQz1m-0U/pics/_8_kQz1m-0U1281863.jpg'}, {'end': 1418.456, 'src': 'embed', 'start': 1388.607, 'weight': 5, 'content': [{'end': 1393.068, 'text': 'Okay, so we have three kind of tags in JSP.', 'start': 1388.607, 'duration': 4.461}, {'end': 1404.292, 'text': 'that is scriptlet to write the Java code, the declarator to declare the attributes and methods, and expression.', 'start': 1393.068, 'duration': 11.224}, {'end': 1406.532, 'text': 'it is like out.println.', 'start': 1404.292, 'duration': 2.24}, {'end': 1409.113, 'text': 'right?. We have system.out.println.', 'start': 1406.532, 'duration': 2.581}, {'end': 1412.594, 'text': 'in JSP we have out.println.', 'start': 1409.113, 'duration': 3.481}, {'end': 1418.456, 'text': 'okay?. The same thing as out.println in the servlets, right?', 'start': 1412.594, 'duration': 5.862}], 'summary': 'Jsp has three tags: scriptlet, declarator, and expression, similar to out.println in servlets.', 'duration': 29.849, 'max_score': 1388.607, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_8_kQz1m-0U/pics/_8_kQz1m-0U1388607.jpg'}], 'start': 930.846, 'title': 'Creating and running servlet and jsp files in eclipse', 'summary': 'Discusses creating servlet and jsp files for a dynamic web project, comparing their file structure and emphasizing the placement of html, web.xml, and java files. it also explains running jsp files in eclipse, setting up to run on a server, configuring web output display, and understanding different tags in jsp.', 'chapters': [{'end': 1044.762, 'start': 930.846, 'title': 'Creating servlet and jsp files', 'summary': 'Discusses the process of creating servlet and jsp files for a dynamic web project, comparing their file structure and emphasizing the placement of html, web.xml, and java files in the respective directories.', 'duration': 113.916, 'highlights': ['The process involves creating a dynamic web project for servlet and JSP, with directories including src, webcontent, webinf, and lib.', 'In servlet, there are three files: HTML file for UI in web content directory, web.xml as the controller in web.inf directory, and the Java file in the src directory.', 'For JSP, all the files are combined into one .jsp file, which includes HTML, web.xml, and Java, and must be placed under the web content directory.']}, {'end': 1418.456, 'start': 1045.942, 'title': 'Running jsp files in eclipse', 'summary': 'Explains how to run jsp files in eclipse, including setting up to run on a server, configuring web output display, adding new browsers, and understanding the different tags in jsp. it also emphasizes the use of internal browsers for efficient code development.', 'duration': 372.514, 'highlights': ["The chapter explains how to run JSP files in Eclipse, including setting up to run on a server. It details the process of running JSP files in Eclipse by right-clicking on the file, selecting 'run as' and specifying 'run on server', which deploys the file on the attached server (e.g., Tomcat, GlassFish).", 'Configuring web output display and adding new browsers is also covered. The chapter mentions the option to choose where the web output should be displayed in Eclipse, including configuring to display in internal or external browsers like IE, Safari, or Opera. Additionally, it explains the process of adding new browsers by specifying the browser location and adding it in Eclipse preferences.', 'Understanding the different tags in JSP is explained. It covers the three types of tags in JSP - scriptlet for Java code, declarator for attributes and methods, and expression like out.println, emphasizing the similarity to system.out.println in servlets.', 'The use of internal browsers for efficient code development is emphasized. The chapter highlights the benefits of using internal browsers for code development to avoid constantly switching to external browsers, saving time and improving efficiency.']}], 'duration': 487.61, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_8_kQz1m-0U/pics/_8_kQz1m-0U930846.jpg', 'highlights': ['The process involves creating a dynamic web project for servlet and JSP, with directories including src, webcontent, webinf, and lib.', 'In servlet, there are three files: HTML file for UI in web content directory, web.xml as the controller in web.inf directory, and the Java file in the src directory.', 'For JSP, all the files are combined into one .jsp file, which includes HTML, web.xml, and Java, and must be placed under the web content directory.', 'The chapter explains how to run JSP files in Eclipse, including setting up to run on a server.', 'Configuring web output display and adding new browsers is also covered.', 'Understanding the different tags in JSP is explained.', 'The use of internal browsers for efficient code development is emphasized.']}], 'highlights': ['JSP simplifies file writing by combining HTML and Java code into a single file, eliminating the need to write three separate files for execution.', 'JSP is a server-side technology with the .jsp extension, executed on application or web servers, combining HTML and Java code for multi-purpose use, predominantly for UI, and used for user interface in the industry.', 'In JSP, the UI portion is in HTML, and the business logic is in a Java file, merging both into one file and removing the need to write web.xml.', 'JSP is used for multi-purpose, both for UI as well as the middle layer, enabling the development of end-to-end projects and connecting to the database using JDBC.', 'JSP files are compiled into servlet files, simplifying the development process and avoiding the need to write multiple complicated files.', 'Advantages of JSP over HTML include the combination of HTML and Java in JSP, eliminating the need to write separate code for HTML and Java in servlets, providing a more efficient and integrated approach.', 'In JSP, both the UI or user interface (HTML) and the business logic (Java) can be incorporated, offering a more comprehensive and versatile solution compared to servlets, which are primarily focused on business logic.', 'The process of JSP execution involves the conversion of JSP files to servlet files through a JSP translator, which are then compiled into .class files and executed by JRE.', 'JSP is used for three-tier architecture and two-tier architecture, with three-tier architecture involving frontend, middle layer, and backend layer.', 'Separate modules in the model view controller architecture make it easier to develop and modify UI without impacting business logic.', 'The three-tier architecture involves a presentation tier, logic tier, and data tier, enhancing performance and scalability.', 'The process involves creating a dynamic web project for servlet and JSP, with directories including src, webcontent, webinf, and lib.', 'In servlet, there are three files: HTML file for UI in web content directory, web.xml as the controller in web.inf directory, and the Java file in the src directory.', 'For JSP, all the files are combined into one .jsp file, which includes HTML, web.xml, and Java, and must be placed under the web content directory.', 'The chapter explains how to run JSP files in Eclipse, including setting up to run on a server.', 'Configuring web output display and adding new browsers is also covered.', 'Understanding the different tags in JSP is explained.', 'The use of internal browsers for efficient code development is emphasized.']}