《java嵌入式tomcat.docx》由会员分享,可在线阅读,更多相关《java嵌入式tomcat.docx(37页珍藏版)》请在第壹文秘上搜索。
1、嵌入式tomcat配置具体说明1、首先我们在myedlps(下建一个java工程,并且添加如下Jar包,备CNtlinajarfacln-optional.jarjconoglja*SStConnons-Iocc114J”connons-nodelet2.0.!jarjgpr-conpilr.jrjsper-conpiler-jdt.jarj4pcr-n2nt1n.jorjsp*Pjrnaning-factory,jarnng-rsources.JArsrvlt-pijarservletsdefault.jrtonctjftrltonctt-cyotejarcfatoncat-http.Jar
2、*tOncftfutiljor工程如图所示,-is/ftycnct-Kit.Bi.JRESystem1.ibraryjdkl.S022-Br.Referenced1.ibrr0SJIctlinjr、CAtalXna-OPHOneI.jr比COTnonhQ1.JftrSI1Comons-IQgeinejr由comons-nodeler-2.O.1.jr圉JJftspQ1.CgpxlorjarffiIjW1.CgpilwjdtjrW1j2per-runtie.ja田厂IJ印-qi.j*nfincfactory,jrncnn-re三ource三.jr囹三rvlt-api.jrS1.servlets-
3、defulljar由toicatO.jar田t1tCAt-coyot.jar囹twct-httpjar图ItOTiCAt-Htll.J4&lib2、然后在SrC下修conf包加入三个xml文件.-confXXXCOngXQnltoncat-users.xnl“b!1context.xmhaorceWEB-INFweb.11latchedResour!-tomcat-userxmi:web.xmltIntroduction!-deployedthisfileisprocessedrfollowedbythe-,/WEB-INFZweb.xmlwdeploymentdescriptorfromyo
4、urownWARNING:Donotconfigureapplication-secficresourceshere!-!-Theyshouldgointhew/WEB-INF/web.xml,fileinyourapplication.-BuiltInServletDefinitionslistingsShoulddirectorylistingsbeproducedifthereisnowelcomefileinthisdirectory?falseWARDING:1.istingsfordirectorieswithmanyentriescanbeslowandmayconsumesignificantproportionsofserverresources.-outputOutputbuffersize(inbyt