JSP out implicit object

JSP out object is an instance of javax.servlet.jsp.JspWriter. It is used to write the data or content on client’s browser. Example: welcome.jsp <html> <head> <title>out implicit object example</title> </head> <body> <% out.print("Hello this is an out implicit object example."); %> </body> </html><html> <head> <title>out implicit object example</title> </head> <body> <% out.print("Hello this is an out … Read more

Categories JSP

JSP implicit objects

JSP implicit objects are created by web container in the translation phase. These objects are created inside the service method so can be used in scriplet tag without any explicitly declaration and initialization. These objects are also known as pre-defined variables. JSP implicit objects are 9 and given below: out (JspWriter). request (HttpServletRequest). response (HttpServletResponse). … Read more

Categories JSP

JSP taglib directive

JSP taglib directive is used in case of custom tags. It specifies the tag library used for custom tags. We will learn more about taglib directive in custom tag section. Attributes of JSP taglib directive: 1. uri. 2. prefix. 1. uri: This attribute specify the location of the tag library. 2. prefix: This attribute is … Read more

Categories JSP

JSP include directive

JSP include directive is used to merge or include the content of other resource into the current JSP page during translation phase. Other resource can be jsp, html or a text file. It provides the facility of code reusability. Syntax: &lt Example: welcome.jsp <html> <head> <title>include directive example</title> </head> <body> <h3>Hello this is an include … Read more

Categories JSP

info attribute in JSP page directive

This attribute is used to provide the JSP page description. Syntax: &lt Example: welcome.jsp <%@ page info="w3spoint" %>   <html> <head> <title>info page directive example</title> </head> <body> <h3>Hello this is an info page directive example.</h3> </body> </html><%@ page info="w3spoint" %> <html> <head> <title>info page directive example</title> </head> <body> <h3>Hello this is an info page directive … Read more

Categories JSP

language attribute in JSP page directive

This attribute is used to specify the scripting language for the current page. Syntax: &lt Example: welcome.jsp <%@ page language="java" %>   <html> <head> <title>language page directive example</title> </head> <body> <h3>Hello this is a language page directive example.</h3> </body> </html><%@ page language="java" %> <html> <head> <title>language page directive example</title> </head> <body> <h3>Hello this is a … Read more

Categories JSP

isThreadSafe attribute in JSP page directive

This attribute is used to specify whether this page supports multithreading or not. It can have true or false value. Syntax: &lt Example: welcome.jsp <%@ page isThreadSafe="true" %>   <html> <head> <title>isThreadSafe page directive example</title> </head> <body> <h3>Hello this is an isThreadSafe page directive example.</h3> </body> </html><%@ page isThreadSafe="true" %> <html> <head> <title>isThreadSafe page directive … Read more

Categories JSP

isErrorPage and errorPage attribute in JSP page directive

isErrorPage attribute: This attribute is used specify that current jsp page can be used as an error page. It can have true or false value. Syntax: &lt errorPage attribute: This attribute is used to specify the URL of JSP page which is used as error page. An error page should have isErrorPage attribute true. Syntax: … Read more

Categories JSP

contentType attribute in JSP page directive

This attribute is used to set the content type of the current JSP page. Syntax: &lt Example: welcome.jsp <%@ page contentType="application/msword" %>   <html> <head> <title>contentType page directive example</title> </head> <body> <h3>Hello this is a contentType page directive example.</h3> </body> </html><%@ page contentType="application/msword" %> <html> <head> <title>contentType page directive example</title> </head> <body> <h3>Hello this is … Read more

Categories JSP

autoFlush attribute in JSP page directive

This attribute is used to control the behaviour of the buffer. Buffer will be flushed automatically when full if autoFlush is true otherwise throw an exception. Syntax: &lt Example: welcome.jsp <%@ page autoFlush="true" %>   <html> <head> <title>autoFlush page directive example</title> </head> <body> <h3>Hello this is a autoFlush page directive example.</h3> </body> </html><%@ page autoFlush="true" … Read more

Categories JSP