Tomcat的Server Options选项详解

2019-10-18 19:49:34丽君

警告: A docBase D:/Tomcat/webapps/Shop inside the host appBase has been specified, and will be ignored

勾选后表示让tomcat直接使用eclipse中的WebContent下的东西
省去publish到<workspace>.metadata.pluginsorg.eclipse.wst.server.coretmp0webapps
并将tmp0webapps下相关的resources删除,
同时会修改<workspace>.metadata.pluginsorg.eclipse.wst.server.coreservers.xml中的serveModulesWithoutPublish=true以及tmp0/conf/server.xml中的<Context>配置

2.勾选第二个是为了防止出现警告:

警 告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:strut2demo' did not find a matching property.

[SetPropertiesRule]警告的原因是Tomcat6.0以上的server.xml的context节点中不再支持source属性了。具体说明如下:

For Tomcat 6, unlike Tomcat 4.x, it is NOT recommended to place <Context> elements directly in the server.xml file. This is because it makes modifying the Context configuration more invasive since the main conf/server.xml file cannot be reloaded without restarting Tomcat.

优化

找到菜单,Window->Preferences

检查英文的拼写没什么用处,这里把拼写检查取消,位置:General->Editors->Text Editors->Spelling,把Enable spell checking 取消勾选

还有一处的检查也可以取消 位置:Validation,勾选Suspend all validators

显示行号 位置:General->Editors->Text Editors,勾选Show line numbers

把jsp页面的默认编码方式改为utf-8 位置:Web->JSP Files,Encoding改为ISO 10646/Unicode(UTF-8)

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持易采站长站。