solution 1: <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" useSendfile="false" compression="on" compressionMinSize="2048" noCompressionUserA…
Nginx failing to load CSS and JS files (MIME type error) Nginx加载静态文件失败的解决方法(MIME type错误) 上线新的页面,需要在nginx上配置路由, 配置完成后发现页面没有正常加载,提示:style.css未加载,因为其MIME类型“text / html”不是“text / css” : 线下nginx的配置是正常的,因此对比两者配置发现线上的ng的http 部分多了一行 add_header Content-Type '…
Question Does anyone know the fastest way to read large text files (10Mb) into a string.Readln is just too slow.   Answer 1 You may try this: function R(const FileName: string): string; var M: TFileStream; begin M := TFileStream.Create(FileName, fmOp…
Tomcat配置使用gzip,在server.xml中 <Connector port="9098" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" URIEncoding="UTF-8" compression="on" compressionMinSize="2048" no…
概述 由于我们项目的三维模型文件非常大,为了提高传输速度,在服务端对其做zip压缩处理非常有必要,能够极大的提高传输速度. 配置 首先需要修改web.xml中请求的数据文件的mime类型的mapping映射关系配置,例如为后缀名为s3m的二进制数据文件添加映射关系: <mime-mapping> <extension>s3m</extension> <mime-type>application/octet-stream</mime-type> &…
----------- HTTP 压缩可以大大提高浏览网站的速度,它的原理是,在客户端请求网页后,从服务器端将网页文件压缩,再下载到客户端,由客户端的浏览器负责解压缩并浏览.相对于普通的浏览过程HTML ,CSS,Javascript , Text ,它可以节省40%左右的流量.更为重要的是,它可以对动态生成的,包括CGI.PHP , JSP , ASP , Servlet,SHTML等输出的网页也能进行压缩,压缩效率惊人. ----------- 要使用gzip压缩功能,可以在Connecto…
当项目jar包过多时,部署项目会报错而错误原因很清楚了,文件太大了. 因为用了nginx代理,而nginx默认文件大小有限,所以需要设置nginx上传文件大小限制 client_max_body_size 2m; 然后重新加载配置即可. 其实本可以不通过nginx转发就可上传,但是直接访问tomcat的manager给我报403错误,未解决....…
if (window != top) { //top.location.href = location.href;//因为系统分为普通用户和后台,所以暂时写死 if(top.location.href.indexOf('${pageContext.request.contextPath}/main/index')>0){ top.location.href = 'login_toLogin'; } } 点击后跳转到后台地址…
https://blog.csdn.net/ctrip_tech/article/details/53337137 说起Too many open files这个报错,想必大家一定不陌生.在Linux系统下,如果程序打开文件句柄数(包括网络连接.本地文件等)超出系统设置,就会抛出这个错误. 不过最近发现Tomcat的类加载机制在某些情况下也会触发这个问题.今天就来分享下问题的排查过程.问题产生的原因以及后续优化的一些措施. 在正式分享之前,先简单介绍下背景. Apollo配置中心是携程框架研发部…
在用Eclipse+Tomcat配置J2EE项目时,出现如下提示错误: Undeployment Failure could not be redeployed because it could not be completely removed in the undeployment phase. the most common cuase of this problem is attempting to redeploy while the server is running,which h…