File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Page directive Doubts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Page directive Doubts" Watch "Page directive Doubts" New topic
Author

Page directive Doubts

Mohammed Yousuff
Ranch Hand

Joined: Oct 17, 2007
Posts: 198
<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=UTF-8"%>

I like to know what the difference between attribute pageEncoding and contentType is. Both almost serves the same purpose, is there any real advantage in using charset inside contentType if we already have the pageEncoding attributes added to tag....

I also have doubt if we include pageEncoding in the page directive, will Web Container will automatically added the HTML META content tag (<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1" />) by itself? if not then what is the use of specifying in the page directive. Thank you

My Thoughts : http://passion4java.blogspot.com
Try not to become a man of success but rather to become a man of value.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Page directive Doubts
 
Similar Threads
arabic data from the database
Character Encoding issue with Tomcat 5.5.9
Unicode convert problem with Jboss in Linux
@page contentType="text/html; charset=UTF-8" ... seems not working
transfering Euro (?) character