Home | Ajax | BioInformatics | Dojo | EAI | EJB | Hibernate | J2ME | Java | Java Glossary | Java Servlets | JavaScript | Jboss | JDBC | JDO | Jmeter | JSF | JSP | JUnit | Maven | MySQL | Spring Framework | SQL | Struts | Technology | WAP | Web Services | XML
 
 
Search All Tutorials

 
Programming Tutorials: Ajax | Articles | JSP | Bioinformatics | Database | Free Books | Hibernate | J2EE | J2ME | Java | JavaScript | JDBC | JMS | Linux | MS Technology | PHP | RMI | Web-Services | Servlets | Struts | UML
 
JSP
  JDO Tutorials
  EAI Articles
  Struts Tutorials
  Java Tutorials
  Java Certification
  Java Applet
Questions
Comments

The pageEncoding Attribute of page Directive In JSP

                         

This section provides the best illustration about the pageEncoding attribute of the page directive in JSP. This attribute specifies the language that the page uses when the page is sent to the browser. This attribute works like the meta tag of the HTML markup language.

Here, in this section you will see the value of the attribute of the page directive is "GBK" in the PageEncoding.jsp page and the value of the attribute is "ISO-8859-1" in the PageEncoding1.jsp. This is the simple difference between the page PageEncoding.jsp and the page PageEncoding1.jsp. But the output is changed from one-another as you can see by differentiating the Chinese character in both output browser.

Here is the code of the PageEncoding.jsp page:

<%@page pageEncoding="GBK" %>
<html>
<head><title>Example of pageEncoding attribute of page directive in JSP.</title></head>
<body>
<table border="1" cellspacing="0" cellpadding="0" bgcolor="ffff00">
			<tr>
<td><strong>ć±This is the example of pageEncoding 
attribute of page directive.</strong></td> </tr> </table> </body> </html>

Output for the PageEncoding.jsp page:

Here is the code of the PageEncoding1.jsp page:

<%@page pageEncoding="ISO-8859-1" %>
<html><html>
<head><title>Example of pageEncoding attribute of page directive in JSP.</title></head>
<body>
  <table border="1" cellspacing="0" cellpadding="0" bgcolor="ffff00">
    <tr>
     <td><strong>ć±This is the example of pageEncoding 
attribute of page directive.</strong></td>
    </tr>
  </table>
</body>
</html>

Output for the PageEncoding1.jsp page:

Download the PageEncoding.jsp page.

Download the PageEncoding1.jsp page.

                         

Facing Programming Problem?
Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 

Current Comments

1 comments so far (post your own) View All Comments Latest 10 Comments:

what is GBK stands for?

Posted by taslim on Friday, 08.31.07 @ 18:50pm | #24622

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

Hot Web Programming Job

Java String toLowerCase Example
Java String toCharArray Example
Java String substring Example
Java String indexOf Example
Java String startsWith Example
Java String hashCode Example
Java String matches Example
Java String length Example
Java String lastIndexOf Example
Java String isEmpty Example
Java String equalsIgnoreCase Example
Java String equals Example
Java String endsWith Example
Java String copyValueOf Example
Java String contentEquals Example
  EAI Articles
  Java Certification
Tell A Friend
Your Friend Name
Search Tutorials

 

 
 
Browse all Java Tutorials
Java JSP Struts Servlets Hibernate XML
Ajax JDBC EJB MySQL JavaScript JSF
Maven2 Tutorial JEE5 Tutorial Java Threading Tutorial Photoshop Tutorials Linux Technology
Technology Revolutions Eclipse Spring Tutorial Bioinformatics Tutorials Tools SQL
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2007. All rights reserved.