我们经常会在JSP页面上使用:
<%@ page trimDirectiveWhitespaces="true" %>
这个命令可以使jsp输出的html时去除多余的空行(jsp上使用EL和tag会产生大量的空格和空行)。
但是这个命令是从JSP2.1规范以后才得到支持。
所以在tomcat 6.0之前的版本上如果使用这个命令就会抛出异常:
Page directive has invalid attribute: trimDirectiveWhitespaces
解决方法是:
1.升级tomcat至6.0以上版本
2.Tomcat 5.5.x+,不要使用trimDirectiveWhitespaces,改用这种方法:
在Tomcat安装目录/conf/web.xml中找到名叫"jsp"的servlet,添加下面一段代码:
<init-param>
<param-name>trimSpaces</param-name>
<param-value>true</param-value>
</init-param>
查看JSP版本可以使用下面的命令:
JSP version: <%= JspFactory.getDefaultFactory().getEngineInfo().getSpecificationVersion() %>
更多信息可以参考:
分享到:
相关推荐
支持rtmp模块的nginx,默认配置文件已配置好rtmp/hls的直播/点播支持,解压运行nginx_start.bat即可启动nginx服务
angular.module('myApp',['directives.dragdrop']); 使用 drop-target="true
主要介绍了由于Nginx配置文件问题导致打不开网站unknown directive,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧
./libavutil/arm/asm.S:50:9: error: unknown directive .arch armv7-a ^ make: *** [libavcodec/arm/aacpsdsp_neon.o] Error 1 最新的 Xcode 已经弱化了对 32 位的支持, 解决方法: 在 compile-ffmpeg.sh中删除...
主要学习AngularJs:Directive指令用法,内容很全面,感兴趣的小伙伴们可以参考一下
本文实例讲述了Angularjs使用directive自定义指令实现attribute继承的方法。分享给大家供大家参考,具体如下: 一、Html代码: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head>...
写在前面:由于directive部分是angularjs中的重中之重,所以会分多篇章进行讲解。本章主要讲解directive返回对象中比较简单的属性 angularjs中使用.directive()来定义指令,该方法接收两个参数:name(指令的名字)...
Nginx 问题 之 nginx: [emerg] unknown directive "echo" in /weblogic/nginx/conf/nginx.conf:43-附件资源
'myDirective' , function ( ) { return function ( $scope , element , attrs , controller ) { // This function will be called for every individual element in the page // that has a "my-directive" ...
包括指令: .directive('imgAreaSelect', function() { return { 限制: 'EA', 链接: function(scope, element, attr) { $(element).imgAreaSelect({// aspectRatio: '1:1',handles : true,fadeSpeed : 200,...
例如: Illuminate \ Support \ Facades \ Blade :: directive ( 'uppercase' , function ( $ expression ) { return "<?php echo strtoupper($expression); ?>" ;}); 因为这似乎是最常见的用例,所以此程序...
Vue.directive(‘my-directive’, { bind: function () {}, inserted: function () {}, update: function () {}, componentUpdated: function () {}, unbind: function () {} }) {{msg}} 更新 ```import Vue ...
Walkthrough:Upload Directive Pipes Global Application Configuration Internationalisation (i18n) Advanced Angular Reusable Component Libraries Using with Docker Webpack Building a Mobile App with ...
指令X JSX指令Directive-X是JSX扩展,可简化JSX中的编码。 它使用Babel转换其“ xProps ”(操纵JSX元素结构)。入门安装通过npm安装软件包: npm install directive-x --save-dev由于Directive-X是Babel插件,因此...
directive-vue3.zip
DIRECTIVE 1999/5/EC OF THE EUROPEAN PARLIAMENT AND OF THE COUNCIL of 9 March 1999 on radio equipment and telecommunications terminal equipment and the mutual recognition of their conformity
1.npm install draggable-vue-directive --save 2. classic draggable 3. import { Draggable } from 'draggable-vue-directive' ... export default { directives: { Draggable, }, ... 4. <div :ref=...
Vue指令(Vue.js 2.x)用于处理元素拖放。 安装 npm install draggable-vue-directive --save 演示版 您可以在此处查看现场演示: : 例子 没有处理程序 classic draggable .vue文件: import { Draggable } ...