ASP.NET伪静态-无法读取配置文件,因为它超过了最大文件大小的解决办法

一直都在使用微软URLRewriter,具体的使用方法我就不多说了,网上文章很多。

但最近遇到一个问题,就是当web.config文件里面设置伪静态规则过多,大于2M的时候,就报错:无法读取配置文件,因为它超过了最大文件大小的解决办法,如图:

QQ图片20131104102637

URLRewriting所有的映射规则都是保存在web.config里面的,导致这个文件过大,所以最好的解决办法就是把里面的映射规则保存到另外一个文件中去。

1、下载和安装MSDNURLRewriting.msi地址

http://download.microsoft.com/download/0/4/6/0463611e-a3f9-490d-a08c-877a83b797cf/MSDNURLRewriting.msi

2、打开源码 Config/RewriterConfiguration.cs 找到下面代码,

/// <summary>
/// GetConfig() returns an instance of the <b>RewriterConfiguration</b> class with the values populated from
/// the Web.config file.  It uses XML deserialization to convert the XML structure in Web.config into
/// a <b>RewriterConfiguration</b> instance.
/// </summary>
/// <returns>A <see cref="RewriterConfiguration"/> instance.</returns>
public static RewriterConfiguration GetConfig()
{if (HttpContext.Current.Cache["RewriterConfig"] == null)HttpContext.Current.Cache.Insert("RewriterConfig", ConfigurationSettings.GetConfig("RewriterConfig"));return (RewriterConfiguration) HttpContext.Current.Cache["RewriterConfig"];
}

修改为

/// <summary>
/// GetConfig() returns an instance of the <b>RewriterConfiguration</b> class with the values populated from
/// the Web.config file.  It uses XML deserialization to convert the XML structure in Web.config into
/// a <b>RewriterConfiguration</b> instance.
/// </summary>
/// <returns>A <see cref="RewriterConfiguration"/> instance.</returns>
public static RewriterConfiguration GetConfig()
{if (HttpContext.Current.Cache["RewriterConfig"] == null){object obj = Acexe.Common.APIXMLSerializer.DeSerializeFromFile(HttpContext.Current.Server.MapPath("~/URLRewriter.config"), typeof(RewriterConfiguration));HttpContext.Current.Cache.Insert("RewriterConfig", obj);}return (RewriterConfiguration)HttpContext.Current.Cache["RewriterConfig"];
}

其中,反序列化类:

using System;
using System.IO;
using System.Text;
using System.Xml;
using System.Xml.Serialization;namespace Acexe.Common
{public class APIXMLSerializer{public static object DeSerialize(string xml, Type type){return DeSerialize(xml, type, Encoding.UTF8);}public static object DeSerialize(string xml, Type type, Encoding encode){return DeSerialize(xml, type, encode, false);}public static object DeSerialize(string xml, Type type, Encoding encode, bool needException){try{XmlSerializer serializer = new XmlSerializer(type);MemoryStream stream = new MemoryStream(encode.GetBytes(xml));object obj2 = serializer.Deserialize(stream);stream.Close();stream.Dispose();return obj2;}catch (Exception){return null;}}public static object DeSerializeFromFile(string filepath, Type type){try{XmlSerializer serializer = new XmlSerializer(type);FileStream stream = new FileStream(filepath, FileMode.Open);object obj2 = serializer.Deserialize(stream);stream.Close();stream.Dispose();return obj2;}catch (Exception){return null;}}public static object DeSerializeUTF8(string xml, Type type){return DeSerialize(xml, type, Encoding.UTF8);}public static string Serialize(object ob){return Serialize(ob, ob.GetType(), Encoding.UTF8);}public static string Serialize(object ob, Type type){return Serialize(ob, type, Encoding.UTF8);}public static string Serialize(object ob, Type type, Encoding encode){try{XmlSerializer serializer = new XmlSerializer(type);XmlSerializerNamespaces namespaces = new XmlSerializerNamespaces();namespaces.Add(string.Empty, string.Empty);XmlWriterSettings settings = new XmlWriterSettings();MemoryStream output = new MemoryStream();settings.OmitXmlDeclaration = true;XmlWriter xmlWriter = XmlWriter.Create(output, settings);serializer.Serialize(xmlWriter, ob, namespaces);xmlWriter.Flush();xmlWriter.Close();string str = encode.GetString(output.GetBuffer());output.Close();output.Dispose();return str.TrimEnd(new char[1]);}catch (Exception){return "";}}public static void SerializeToFile(object ob, Type type, string filepath){try{XmlSerializer serializer = new XmlSerializer(type);StreamWriter writer = new StreamWriter(filepath);serializer.Serialize((TextWriter)writer, ob);writer.Close();writer.Dispose();}catch (Exception){}}public static string SerializeUTF8(object ob, Type type){return Serialize(ob, type, Encoding.UTF8);}}
}

3、配置伪静态规则到网站根目录下URLRewriter.config(路径根据实际需要可调整)

<?xml version="1.0"?>
<RewriterConfig><Rules><!--首页--><RewriterRule><LookFor>~/index.html</LookFor><SendTo>~/default.aspx</SendTo></RewriterRule><RewriterRule><LookFor>~/Vacations/(.[0-9]*)S(.[0-9]*)A(.[0-9]*)C(.[0-9]*)D(.[0-9]*)E(.[0-9]*)F(.[0-9]*)H(.[0-9]*)J(.[0-9]*)R(.[0-9]*)T(.[0-9]*)W(.[0-9]*)X(.[0-9]*)Y(.[0-9]*)P(.[0-9]*)/index.html</LookFor><SendTo>~/Vacations/List.aspx?sid=$1&amp;A=$3&amp;C=$4&amp;D=$5&amp;E=$6&amp;F=$7&amp;H=$8&amp;J=$9&amp;R=$10&amp;T=$11&amp;W=$12&amp;X=$13&amp;Y=$14&amp;P=$15</SendTo></RewriterRule></Rules>
</RewriterConfig>

4、配置Web.Config文件(和网上其他说明的配置一样)

     (1)添加下面内容到configSections节点下

<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter"/>

     (2)添加下面内容到httpHandlers节点下

<add verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler, URLRewriter"/>
<add verb="*" path="*.html" type="URLRewriter.RewriterFactoryHandler, URLRewriter"/>

     (3)如果是IIS7,添加下面内容到handlers节点下

<!--IIS7URL重写配置开始-->
<add name="all" path="*" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="None" preCondition="classicMode,runtimeVersionv2.0,bitness64" />
<add name="Html" path="*.html" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv2.0,bitness64" />
<add name="ASPNET_ISAPI" path="*" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="None" preCondition="classicMode,runtimeVersionv2.0,bitness32" />
<!--IIS7URL重写配置结束—>

以下是全部Web.Config文件配置

<?xml version="1.0"?>
<!-- 注意: 除了手动编辑此文件外,您还可以使用 Web 管理工具来配置应用程序的设置。可以使用 Visual Studio 中的“网站”->“Asp.Net 配置”选项。设置和注释的完整列表可以在machine.config.comments 中找到,该文件通常位于\Windows\Microsoft.Net\Framework\vx.x\Config 中 
-->
<configuration><configSections><sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"><sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"><section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/><sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"><section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/><section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/><section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/><section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/></sectionGroup></sectionGroup></sectionGroup><section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter"/></configSections><system.web><!-- 设置 compilation debug="true" 可将调试符号插入到已编译的页面。由于这会影响性能,因此请仅在开发过程中将此值设置为 true。--><compilation debug="true"><assemblies><add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/><add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/><add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/><add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies><buildProviders><add extension=".html" type="System.Web.Compilation.PageBuildProvider" /></buildProviders></compilation><!--通过 <authentication> 节可以配置安全身份验证模式,ASP.NET 使用该模式来识别来访用户身份。 --><authentication mode="Windows"/><!--如果在执行请求的过程中出现未处理的错误,则通过 <customErrors> 节可以配置相应的处理步骤。具体而言,开发人员通过该节可配置要显示的 html 错误页,以代替错误堆栈跟踪。<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm"><error statusCode="403" redirect="NoAccess.htm" /><error statusCode="404" redirect="FileNotFound.htm" /></customErrors>--><pages><controls><add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/><add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></controls></pages><httpHandlers><remove verb="*" path="*.asmx"/><add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/><add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/><add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/><add verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler, URLRewriter"/><add verb="*" path="*.html" type="URLRewriter.RewriterFactoryHandler, URLRewriter"/></httpHandlers><httpModules><add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></httpModules></system.web><system.codedom><compilers><compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"><providerOption name="CompilerVersion" value="v3.5"/><providerOption name="WarnAsError" value="false"/></compiler><compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"><providerOption name="CompilerVersion" value="v3.5"/><providerOption name="OptionInfer" value="true"/><providerOption name="WarnAsError" value="false"/></compiler></compilers></system.codedom><!-- system.webServer 节是在 Internet Information Services 7.0 下运行 ASP.NET AJAX所必需的。对早期版本的 IIS 来说则不需要此节。--><system.webServer><validation validateIntegratedModeConfiguration="false"/><modules><remove name="ScriptModule"/><add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></modules><handlers><remove name="WebServiceHandlerFactory-Integrated"/><remove name="ScriptHandlerFactory"/><remove name="ScriptHandlerFactoryAppServices"/><remove name="ScriptResource"/><add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/><add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/><add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/><!--IIS7URL重写配置开始--><add name="all" path="*" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="None" preCondition="classicMode,runtimeVersionv2.0,bitness64" /><add name="Html" path="*.html" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv2.0,bitness64" /><add name="ASPNET_ISAPI" path="*" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="None" preCondition="classicMode,runtimeVersionv2.0,bitness32" /><!--IIS7URL重写配置结束--></handlers><defaultDocument><files><clear /><add value="default.aspx" /><add value="index.html" /><add value="index.asp" /></files></defaultDocument></system.webServer><runtime><assemblyBinding appliesTo="v2.0.50727" xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/><bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/></dependentAssembly><dependentAssembly><assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/><bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/></dependentAssembly></assemblyBinding></runtime>
</configuration>

qrcode

三五旅游网 http://www.35lvyou.com

转载于:https://www.cnblogs.com/caiqin/p/3406020.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/360268.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

java定义list_我的Java Web之路59 - Java中的泛型

本系列文章旨在记录和总结自己在Java Web开发之路上的知识点、经验、问题和思考&#xff0c;希望能帮助更多(Java)码农和想成为(Java)码农的人。目录介绍再谈Java中的类型为什么需要泛型&#xff1f;Java中的泛型泛型类型泛型方法总结介绍还记得我在这篇文章(我的Java Web之路3…

Spring查找方法示例

当一个bean依赖于另一个bean时&#xff0c;我们使用setter属性或通过构造函数注入bean。 getter方法将向我们返回已设置的引用&#xff0c;但是假设您每次调用getter方法时都想要一个依赖bean的新实例&#xff0c;那么您可能将不得不采用另一种方法。 在本文中&#xff0c;我…

mysql判断数字的函数_Mysql必读MySql判断汉字、日期、数字的具体函数

《Mysql必读MySql判断汉字、日期、数字的具体函数》要点&#xff1a;本文介绍了Mysql必读MySql判断汉字、日期、数字的具体函数&#xff0c;希望对您有用。如果有疑问&#xff0c;可以联系我们。MYSQL学习几个平常用的mysql函数,MySql判断汉字、日期、数字的具体函数分享给大家…

编码:可视化位图

在过去的一个月左右的时间里&#xff0c;我每天花费一些时间来阅读Neo4j代码库的新部分&#xff0c;以使其更加熟悉&#xff0c;而我最喜欢的类之一是Bits类&#xff0c;该类可以完成所有底层工作&#xff0c;并且到磁盘。 特别是&#xff0c;我喜欢它的toString方法&#xff…

通过更改透明度使图片为透明

使用AlphaBlend函数 函数功能 该函数用来显示具有指定透明度的图像。函数原型 AlphaBlend(HDC hdcDest,int nXOriginDest,int nYOriginDest,int nWidthDest,int hHeightDest,HDC hdcSrc,int nXOriginSrc,int nYOriginSrc,int nWidthSrc,int nHeightSrc,BLENDFUNCTION blendFunc…

(转)CocoaPods:管理Objective-c 程序中各种第三方开源库关联

在我们的iOS程序中&#xff0c;经常会用到多个第三方的开源库&#xff0c;通常做法是去下载最新版本的开源库&#xff0c;然后拖拽到工程中。 但是&#xff0c;第三方开源库的数量一旦比较多&#xff0c;版本的管理就非常的麻烦。有没有什么办法可以简化对第三方库的管理呢&…

为什么子进程每次执行顺序不一样_看完这篇还不懂Redis的RDB持久化,你来打我...

推荐观看&#xff1a;Redis缓存穿透的终极解决方案&#xff0c;手写布隆过滤器_哔哩哔哩 (゜-゜)つロ 干杯~-bilibili​www.bilibili.comP8架构师串讲&#xff1a;Redis&#xff0c;zookeeper&#xff0c;kafka&#xff0c;Nginx等技术_哔哩哔哩 (゜-゜)つロ 干杯~-bilibili​w…

Spring XD用于数据提取

Spring XD是一个功能强大的工具&#xff0c;它是一组可安装的Spring Boot服务&#xff0c;可以独立运行&#xff0c;在YARN或EC2之上运行。 Spring XD还包括一个管理UI网站和一个用于作业和流管理的命令行工具。 Spring XD是一组功能强大的服务&#xff0c;可与各种数据源一起使…

JDK 9 REPL:入门

会议是聚会Java名人的好地方。 Devoxx France是与Java语言架构师&#xff0c;前同事和老朋友Brian Goetz&#xff08; briangoetz &#xff09;见面的一个机会。 我们谈论了JDK 9&#xff0c;而他全都热衷于REPL。 他提到&#xff0c;尽管Java SE 9中有很多重要功能 &#xff0…

sinaapp mysql连接_手把手教你在新浪云上免费部署自己的网站--连接数据库

看完之后&#xff0c;默认你知道怎么将代码上传到新浪云SAE&#xff0c;并且能够成功运行&#xff0c;连接数据库之前&#xff0c;你必须先创建有一个应用。现在我创建一个名称为sampleone的应用&#xff0c;如下图点击左侧的代码管理&#xff0c;选在右侧创建一个版本然后就会…

HDU-4527 小明系列故事——玩转十滴水 模拟

题意&#xff1a;就是平时玩的十滴水游戏&#xff0c;游戏者拥有一定的水滴&#xff0c;能够滴在某些位置&#xff0c;如果一个点上的体积超过了4就会爆炸&#xff0c;向四周传递一个小水滴。该题就是要求模拟这个过程。 分析&#xff1a;这里有一个问题就是不能够使用递归来处…

win8改win7 教程

新入手的WIN8怎么改成WIN7呢&#xff1f;下面以戴尔Dell V3560 win8换win7系统为例说明&#xff1a; win8改win7本文转自http://jingyan.baidu.com/article/ed2a5d1f2a97ee09f6be17e2.html 第一步&#xff1a;开机过程中不断按F2进入到BIOS&#xff0c;更改bios设置&#xff0c…

7 centos 查看程序文件数量_解析CentOS 7中系统文件与目录管理

LINUXLinux操作系统解析CentOS 7中系统文件与目录管理Linux目录结构Linux目录结构是树形的目录结构根目录所有分区、目录、文件等的位置起点整个树形目录结构中&#xff0c;使用独立的一个“/”表示常见的子目录目录目录名称目录目录名称/root管理员家目录/bin所有用户可执行命…

IE浏览器模式设置

文件兼容性用于定义让IE如何编译你的网页。此文件解释文件兼容性&#xff0c;如何指定你网站的文件兼容性模式以及如何判断一个网页该使用的文件模式。 前言 为了帮助确保你的网页在所有未来的IE版本都有一致的外观&#xff0c;IE8引入了文件兼容性。在IE6中引入一个增设的兼容…

mysql存储过程套嵌_mysql存储过程套嵌

{"moduleinfo":{"card_count":[{"count_phone":1,"count":1}],"search_count":[{"count_phone":4,"count":4}]},"card":[{"des":"阿里云数据库专家保驾护航&#xff0c;为用户…

拆卸invokedynamic

许多Java开发人员认为JDK的第七版有些令人失望。 从表面上看&#xff0c;仅少数语言和库扩展使它成为了发行版&#xff0c;即Project Coin和NIO2 。 但在幕后&#xff0c;该平台的第七个版本对JVM类型系统进行了最大的扩展&#xff0c;这是它最初发布后引入的。 添加invokedyna…

CRON

http://blog.csdn.net/tianlesoftware/article/details/5315039 1. 同时修改文件的修改时间和访问时间 touch -d "2010-05-31 08:10:30" test.doc 2. 只修改文件的修改时间 touch -m -d "2010-05-31 08:10:30" test.doc 3. 只修改文件的访问时间 touch -a …

mysql innodb_file_format_Innodb表压缩过程中遇到的坑(innodb_file_format)

对于越来越多的数据&#xff0c;数据库的容量越来越大&#xff0c;压缩也就越来越常见了。在我的实际工作中进行过多次压缩工作&#xff0c;也遇到多次问题&#xff0c;在此和大家分享一下。首先&#xff0c;我们先说说怎么使用innodb的压缩.第一&#xff0c;mysql的版本需要大…

java内存泄漏和内存溢出_Java和内存泄漏

java内存泄漏和内存溢出总览 术语“内存泄漏”在Java中的使用方式不同于在其他语言中使用的方式。 通用术语中的“内存泄漏”是什么意思&#xff0c;在Java中如何使用&#xff1f; 维基百科的定义 当计算机程序消耗内存但无法将其释放回操作系统时&#xff0c;就会发生计算机科…

JSP内置对象之WEB安全性及config对象

一、WEB-INF的安全性是最高的。 在Java EE的标准中&#xff0c;Web目录中的WEB-INF是必须存在的&#xff0c;而且此文件夹的安全性是最高的&#xff0c;在各个程序的开发中&#xff0c;基本上都将一些配置信息保存在此文件夹中。在定义WEB-INF目录时一定要注意大小写的问题&…