Tuesday 13 September 2011

How to change contentType of a jsp page response at run time without using scriplet

write the following lines of code in your jsp

<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:set property="contentType" target="${pageContext.response}" value="text/html;charset=UTF-8"/>

No comments:

Post a Comment

How to customize java.util.logging.Logger class to write logs in separate file than System.out.log in Websphere commerce/ HCL commerce)

/** * This method updated the passed in java.util.logging.Logger object with * custom file handler to write logs data form that class ...