Meaning of netbeans project folder9/11/2023 ![]() ![]() Let's see the simple example of JSP where we are using the scriptlet tag to put Java code in the JSP page. Put it in a folder and paste the folder in the web-apps directory in apache tomcat to run the JSP page. To create the first JSP page, write some HTML code as given below, and save it by. Moreover, all the processes that happen in Servlet are performed on JSP later like initialization, committing response to the browser and destroy. After that, Servlet page is compiled by the compiler and gets converted into the class file. The JSP translator is a part of the web server which is responsible for translating the JSP page into Servlet. But, the sub-directory myapp is simply one of the project name of your NetBeans projects which is to be stored inside the parent NetBeans projects directory (D:devjavaproject) here. Note: jspInit(), _jspService() and jspDestroy() are the life cycle methods of JSP.Īs depicted in the above diagram, JSP page is translated into Servlet by the help of JSP translator. The project directory is just a place where you’ve custom-specified the netbeans projects storage. Destroy ( the container invokes jspDestroy() method).Request processing ( the container invokes _jspService() method).Initialization ( the container invokes jspInit() method).Instantiation (Object of the Generated Servlet is created). ![]() Classloading (the classloader loads class file).Moreover, we can use EL, implicit objects, etc. In JSP, we can use many tags such as action tags, JSTL, custom tags, etc. The meaning of the project.xml elements, as well as property names in project.properties and other files, will be discussed later. The Servlet code needs to be updated and recompiled if we have to change the look and feel of the application. But, the sub-directory myapp is simply one of the project name of your NetBeans projects which is to be stored inside the parent NetBeans projects directory (D:\dev\java\project) here. If JSP page is modified, we don't need to recompile and redeploy the project. The project directory is just a place where you’ve custom-specified the netbeans projects storage. 3) Fast Development: No need to recompile and redeploy In Servlet technology, we mix our business logic with the presentation logic. JSP can be easily managed because we can easily separate our business logic with presentation logic. In addition to, we can use implicit objects, predefined tags, expression language and Custom tags in JSP, that makes JSP development easy. We can use all the features of the Servlet in JSP. JSP technology is the extension to Servlet technology. They are as follows: 1) Extension to Servlet There are many advantages of JSP over the Servlet. It provides some additional features such as Expression Language, Custom Tags, etc. The JSP pages are easier to maintain than Servlet because we can separate designing and development. It can be thought of as an extension to Servlet because it provides more functionality than servlet such as expression language, JSTL, etc.Ī JSP page consists of HTML tags and JSP tags. JSP technology is used to create web application just like Servlet technology.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |