欢迎来到天天文库
浏览记录
ID:10084398
大小:35.00 KB
页数:0页
时间:2018-05-24
《deploying web applications using tomcat》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、DummiesGuidetoInstallingandConfiguringTomcat17九月2002DeployingWebApplicationsUsingTomcatDefinitionofaWebApplicationWebapplicationscancontainthefollowingitems:·Servlets·JavaServerPages·UtilityClasses·StaticDocumentsincludingXHTML,images,HTMLetc.·Clientsideclasses·Metainformation
2、thatdescribesthewebapplication.DirectoryStructureThefirststeptocreateawebapplicationistocreatethedirectorystructure.Thedirectorystructureshouldbecreatedinthe.Eg.TOMCAT_HOMEwebappsTOMCAT_HOME–beingtheinstallationdirectoryofTomcat.Forawebapplicationcalledhelloworld
3、thefollowingdirectorystructureneedstobecreated.DirectoryContains/helloworldRootdirectoryforwebapplicationcontainsJSP,HTMLetc./helloworld/WEB-INFDirectorycontainsallresourcesrelatedtotheapplicationthatarenotinthedocumentroot.Thisiswherethewebapplicationdeploymentdescriptorisloc
4、ated.Filesinthisdirectorycannotbeserveddirectorytotheclient./helloworld/WEB-INF/classesServletandutilityclassesareplaced./helloworld/WEB-INF/libJavaArchive(jar)filesthatthewebapplicationrequires.WebApplicationDeploymentDescriptorThedeploymentdescriptoristheheartofawebapplicati
5、on.Itisanxmlfilelocatedinthefollowingdirectory.application_nameWEB-INFdirectory.Thedeploymentdescriptorfileiscalledweb.xml.Asimpleweb.xmlfilewilllooklike:PageNo:4of4DummiesGuidetoInstallingandConfiguringTomcat17九月20026、CTYPEweb-appPUBLIC"-//SunMicrosystems,Inc.//DTDWebApplication2.3//EN""http://java.sun.com/j2see/dtds/web-app_2_3.dtd">HelloWorldHelloWorldServlet17、p>Web.xmlElementsElementTagDescriptionContainstheweb-applicationDefinestheservletsforyourweb-application.Eachservletintheweb-applicationshouldhaveaentryAcanonicalnameofthedeployedservlet8、Thefullyqualifiedclassnameoftheservlet
6、CTYPEweb-appPUBLIC"-//SunMicrosystems,Inc.//DTDWebApplication2.3//EN""http://java.sun.com/j2see/dtds/web-app_2_3.dtd">HelloWorldHelloWorldServlet17、p>Web.xmlElementsElementTagDescriptionContainstheweb-applicationDefinestheservletsforyourweb-application.Eachservletintheweb-applicationshouldhaveaentryAcanonicalnameofthedeployedservlet8、Thefullyqualifiedclassnameoftheservlet
7、p>Web.xmlElementsElementTagDescriptionContainstheweb-applicationDefinestheservletsforyourweb-application.Eachservletintheweb-applicationshouldhaveaentryAcanonicalnameofthedeployedservlet
8、Thefullyqualifiedclassnameoftheservlet
此文档下载收益归作者所有