Share on Google+Share on Google+

Language' attribute of JSP page directive

Advertisement
In this Section , we will discuss about the "language" attribute of a JSP page & its use in JSP page.

'Language' attribute of JSP page directive

In this Section , we will discuss about the "language" attribute of a JSP page & its use in JSP page. A directive element in a JSP page provides global information about a particular JSP page.Page directive attributes that notify the Web container about the general settings of a JSP page. The syntax of the page directive is  : 

  <%@    page attribute_list    %>

Language attribute defines the scripting language of the JSP page. The syntax of the page directive is :

<%@page language="language_name" %> 

Code using 'language' attribute of JSP page directive  

<%@page language="java" %>

<html>

<head><title>Hello World JSP Page.</title></head>

<body>

<font size="10">

<%

String name="Ankit";

out.println("Hello " + name + "!");

%>

</font>

</body>

</html>

 

Output

 

 

Advertisements

Posted on: June 10, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.