TODAY JAVA SCHOOL

In java school, programming, design, computer general knowledge, web application, software, web services, social media, digital marketing, oops, concept of programming language, oops feature, console media, graphics medium, first programming, c, c ++ , Java, PHP, SQL, MySQL, HTML, HTML_5, J_query, JavaScript, Bootstrap, Framework, images with logos, examples, shared and explained.

https://www.amazon.in/b?node=26373545031&linkCode=ll2&tag=1234567801cdb-21&linkId=3b9882431b00409b44141e0344b35a15&language=en_IN&ref_=as_li_ss_tl

Breaking

Monday 27 April 2020

JSP Page Directive In Java | JSP Page Directive Tag In Java

JSP Page Directive

The page directive defines attributes that apply to an entire JSP page.

 

Syntax of JSP page directive


<%@ page attribute="value" %>

download image of jsp directive

Fig: JSP Page Directive 


 

Attributes of JSP page directive

  • import
  • contentType
  • extends
  • info
  • buffer
  • language
  • isELIgnored
  • isThreadSafe
  • autoFlush
  • session
  • pageEncoding
  • errorPage
  • isErrorPage

1)import

The import attribute is used to import class,interface or all the members of
 a package.It is similar to import keyword in java class or interface.
                                                                                                                 

2)contentType

The contentType attribute defines the MIME(Multipurpose Internet Mail Extension) type of the HTTP response.The default value is "text/html;charset=ISO-8859-1".

3)extends

The extends attribute defines the parent class that will be inherited by the generated servlet.It is rarely used.

4)info

This attribute simply sets the information of the JSP page which is retrieved later by using getServletInfo() method of Servlet interface.

5)buffer

The buffer attribute sets the buffer size in kilobytes to handle output generated by the JSP page.The default size of the buffer is 8Kb.

6)language

The language attribute specifies the scripting language used in the JSP page. The default value is "java".

 

7)isELIgnored


We can ignore the Expression Language (EL) in jsp by the isELIgnored
attribute. By default its value is false i.e. Expression Language is
enabled by default. We see Expression Language later.
      
       <%@ page isELIgnored="true" %>//Now EL will be ignored  

8)isThreadSafe


Servlet and JSP both are multithreaded.If you want to control this
behaviour of JSP page, you can use isThreadSafe attribute of page
directive.The value of isThreadSafe value is true.If you make it false,
 the web container will serialize the multiple requests, i.e. it will wait
until the JSP  finishes responding to a request before passing another
 request to it.If you make the value of  isThreadSafe attribute like:

     <%@ page isThreadSafe="false" %>

9)errorPage

The errorPage attribute is used to define the error page, if exception occurs in the current page, it will be redirected to the error page.

10)isErrorPage

The isErrorPage attribute is used to declare that the current page is the error page.

No comments:

Post a Comment