简体   繁体   English

如何在Tomcat中部署Eclipse动态网页?

[英]how to deploy a eclipse dynamic web page in tomcat?

I developed dynamic web page in eclipse.I also configured apache tomcat in eclipse juno.In eclipse it run on server fine.I don't know how to deploy the dynamic web page in other system tomcat server.My folder structure. 我在eclipse中开发了动态网页。我也在eclipse juno中配置了apache tomcat。在eclipse中它可以在服务器上正常运行。我不知道如何在其他系统tomcat服务器中部署动态网页。我的文件夹结构。

                 Tomcat 7.0
                     -webapps
                         -Myproject-Folder
                             -WEB-INF
                                 -classes
                                 -lib
                                 -web.xml   

create a folder in your tomcat webapps folder Then create another folder WEB-INF and index.html Then in WEB-INF folder create three other folders classes,src,lib and web.xml 在tomcat webapps文件夹中创建一个文件夹,然后创建另一个文件夹WEB-INF和index.html,然后在WEB-INF文件夹中创建其他三个文件夹类,src,lib和web.xml

In classes folder keep all the .class files. 在classes文件夹中,保存所有.class文件。 If you want to keep the source files then these should be placed in the src folder. 如果要保留源文件,则应将它们放在src文件夹中。 In the lib folder keep all the necessary jar files like activation.jar,mail.jar(if you are using java mail Api). 在lib文件夹中,保存所有必需的jar文件,例如activation.jar,mail.jar(如果使用的是Java Mail Api)。 Now map correctly in web.xml Now if your web.xml is correctly mapped then open a browser and type 现在在web.xml中正确映射现在,如果正确映射了web.xml,则打开浏览器并输入

http://localhost:8080/your_folder_name

8080 is the default port number. 默认端口号为8080。

只需将“ Myproject-Folder”复制到任何tomcat的“ webapps”文件夹中

根据您要部署它的方式,您可以只复制当前Tomcat的“ webapps”下的文件夹,或将其打包为.war并将其放在目标Tomcat的webapps文件夹下。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM