What Are JSP Custom Tags

JSP Custom tags are user defined JSP language elements. JSP custom tags are user defined tags that can encapsulate common functionality. For example you can write your own tag to access the database and performing database operations. You can also write custom tags to encapsulate both simple and complex behaviors in an easy to use … Read more

What Are The Life-Cycle Methods of JSP

Life-cycle methods of the JSP are: jspInit(): The container calls the jspInit() to initialize the servlet instance. It is called before any other method, and is called only once for a servlet instance. _jspService(): The container calls the _jspservice() for each request and it passes the request and the response objects. _jspService() method cann’t be … Read more

What is a JSP Scriptlet

JSP Scriptlets is a term used to refer to pieces of Java code that can be embedded in a JSP PAge. Scriptlets begins with <% tag and ends with %> tag. Java code written inside scriptlet executes every time the JSP is invoked. In advanced Java, a JSP (JavaServer Pages) scriptlet is a block of … Read more

What Types of Comments Are Available in the JSP?

There are two types of comments that are allowed in the JSP. They are hidden and output comments. A hidden comment does not appear in the generated HTML output, while output comments appear in the generated output. Example of hidden comment: < % – – This is a hidden comment – – % > Example … Read more

What is Expression in JSP

Expression tag is used to insert Java values directly into the output. Syntax for the Expression tag is: <%= expression %> An expression tag contains a scripting language expression that is evaluated, converted to a String, and inserted where the expression appears in the JSP file. The most commonly used language is regular Java. In … Read more