Jsp page to remove the big break in the ugly wrap

Since my last post on trimming whitespace in JSPs seems to be a popular topic, I figured it appropriate to note that JSP 2.1 supports a new trimWhitespace directive. If you're using a Servlet 2.5 XSD, you can also do this in your web. xml: <jsp-config> <jsp-property-group> <url-pattern> *. jsp </ url-pattern> <trim-directive-whitespaces> true </ trim-directive-whitespaces> </ jsp-property- group> </ jsp-config> A Servlet 2.5 XSD seems to be the following: <web-app xmlns = "http://java.sun.com/xml/ns/javaee" xmlns: xsi = "http:// www.w3.org/2001/XMLSchema-instance "xsi: schemalocation =" http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web- app_2_5.xsd "metadata-complete =" false "version =" 2.5 "> To learn more about this feature, view Summary of New Features in JSP 2.1 Technology and search for" TrimWhiteSpace ". It'd be nice if there was anchors in this article for a direct link, but I couldn't find any. Now I just wish JSP's EL had an xmlEscape = "true" flag to escape XML in printed variables. Freemarker supports this. Hat tip to Kerem and Krishna's Unified Expression Language for JSP and JSF article. </ web-app>

分类:Java 时间:2010-07-12 人气:196
分享到:
blog comments powered by Disqus

相关文章

iOS 开发

Android 开发

Python 开发

JAVA 开发

开发语言

PHP 开发

Ruby 开发

搜索

前端开发

数据库

开发工具

开放平台

Javascript 开发

.NET 开发

云计算

服务器

Copyright (C) codeweblog.com, All Rights Reserved.

CodeWeblog.com 版权所有 黔ICP备15002463号-1

processed in 0.395 (s). 13 q(s)