Thrown by a simple tag handler to indicate that the remainder of the page must not be evaluated. This exception should not be thrown manually in a JSP page.
This comment is suitable for developers to provide code level comments because these are not sent in the client response. Scriptlet tags are the easiest way to put java code in a JSP page. Since most of the times we print dynamic data in JSP page using out. JSP Directives are used to give special instructions to the container while JSP page is getting translated to servlet source code.
JSP Declarations are used to declare member methods and variables of servlet class. Once JSP files are translated to Servlet source code, the source code. If the JSP files are inside other directories of application, the directory structure is maintained. As a java programmer, sometimes it helps to look into the generated source for debugging purposes. We can define init parameters for the JSP page as shown in above example and we can retrieve them in JSP using config implicit object, we will look into implicit objects in JSP in more detail in future posts.
Apart from standard servlet attributes with request, session and context scope, in JSP we have another scope for attributes, i. Thats all for JSP example tutorial for beginners. I hope it helps you in understanding the basic concepts of JSPs and help you in getting started. We will look into other JSP features in future posts.
The ide i use is Intellij idea, but i cannot find the jsp transformed source files and servlet classes. Hello Pankaj, Your articles are really nice but only problem are the frequent pop-ups which really destruct the concentration. Java scriptlets have been obsolete and discredited since the introduction of JSP 2. Your email address will not be published. Prev 50 Servlet Interview Questions and Answers. Pankaj I love Open Source technologies and writing about my experience about them is my passion.
Follow Author. Comments supriya kavade says:. April 13, at am. December 5, at am. Yalong says:. January 6, at pm. Connection to Database is easier :-It is easier to connect website to database and allows to read or write data easily to the database. Make Interactive websites :- In this we can create dynamic web pages which helps user to interact in real time environment.
Portable, Powerful, flexible and easy to maintain :- as these are browser and server independent. No Redeployment and No Re-Compilation :- It is dynamic, secure and platform independent so no need to re-compilation. Skip to content. Change Language. Related Articles. Table of Contents. Improve Article. Save Article. Like Article. Attention reader! As mentioned before, JSP is one of the most widely used language over the web. I'm going to list few of them here:. The advantages of JSP are twofold.
First, the dynamic part is written in Java, not Visual Basic or other MS specific language, so it is more powerful and easier to use.
Second, it is portable to other operating systems and non-Microsoft Web servers. It is more convenient to write and to modify! SSI is really only intended for simple inclusions, not for "real" programs that use form data, make database connections, and the like.
0コメント