天天看点

怎样将做好的java项目如何部署到tomcat,然后运行

亲测:

初步可以分为静态部署和动态部署,静态的意思是在tomcat启动前部署,动态则是在启动后在部署。

准备工作,下载tomcat6,地址如下

http://apache.etoak.com/tomcat/tomcat-6/v6.0.29/bin/apache-tomcat-6.0.29.zip

然后解压。

假设我们编译好后的项目在文件夹 abc 下面,以下是我的abc目录下面的结构

abc

├─images

│ └─highslide

│ └─outlines

├─js

│ ├─fckeditor

│ │ └─editor

│ │ ├─css

│ │ │ ├─behaviors

│ │ │ └─images

│ │ ├─dialog

│ │ │ ├─common

│ │ │ │ └─images

│ │ │ ├─fck_about

│ │ │ │ └─sponsors

│ │ │ ├─fck_docprops

│ │ │ ├─fck_flash

│ │ │ ├─fck_image

│ │ │ ├─fck_link

│ │ │ ├─fck_select

│ │ │ ├─fck_spellerpages

│ │ │ │ └─spellerpages

│ │ │ │ └─server-scripts

│ │ │ └─fck_template

│ │ │ └─images

│ │ ├─dtd

│ │ ├─filemanager

│ │ │ └─browser

│ │ │ └─default

│ │ │ ├─images

│ │ │ │ └─icons

│ │ │ │ └─32

│ │ │ └─js

│ │ ├─images

│ │ │ └─smiley

│ │ │ └─msn

│ │ ├─js

│ │ ├─lang

│ │ ├─plugins

│ │ │ ├─autogrow

│ │ │ ├─bbcode

│ │ │ │ └─_sample

│ │ │ ├─dragresizetable

│ │ │ ├─placeholder

│ │ │ │ └─lang

│ │ │ ├─simplecommands

│ │ │ └─tablecommands

│ │ ├─skins

│ │ │ ├─default

│ │ │ │ └─images

│ │ │ ├─office2003

│ │ │ │ └─images

│ │ │ └─silver

│ │ │ └─images

│ │ └─wsc

│ ├─jquery

│ │ ├─external

│ │ └─ui

│ ├─My97DatePicker

│ │ ├─lang

│ │ └─skin

│ │ ├─default

│ │ └─whyGreen

│ ├─uploadify

│ └─validation

│ ├─lib

│ ├─src

│ └─styles

├─META-INF

├─pages

│ ├─admin

│ │ ├─applymgr

│ │ ├─cardmgr

│ │ ├─combomgr

│ │ ├─customermgr

│ │ ├─noticemgr

│ │ ├─orginfomgr

│ │ ├─orgusermgr

│ │ ├─resmgr

│ │ └─zerousermgr

│ ├─include

│ ├─pab

│ └─passport

├─style

│ └─jquery

└─WEB-INF

├─classes

│ ├─com

│ │ ├─yihaodian

│ │ │ └─central

│ │ │ └─ws

│ │ │ └─server

│ │ │ └─api

│ │ │ ├─dto

│ │ │ └─result

│ │ └─yiwang

│ │ ├─action

│ │ │ ├─customer

│ │ │ ├─passport

│ │ │ └─ws

│ │ ├─admin

│ │ │ ├─action

│ │ │ ├─dao

│ │ │ │ └─impl

│ │ │ ├─service

│ │ │ │ └─impl

│ │ │ └─util

│ │ ├─applet

│ │ ├─dao

│ │ │ └─customer

│ │ │ └─impl

│ │ ├─dto

│ │ ├─interceptor

│ │ ├─model

│ │ ├─pab

│ │ │ ├─action

│ │ │ │ ├─backend

│ │ │ │ └─front

│ │ │ ├─dao

│ │ │ │ └─impl

│ │ │ ├─model

│ │ │ ├─service

│ │ │ │ └─impl

│ │ │ └─util

│ │ ├─service

│ │ │ ├─card

│ │ │ ├─customer

│ │ │ │ └─impl

│ │ │ ├─impl

│ │ │ └─passport

│ │ │ └─impl

│ │ ├─util

│ │ │ └─ipseek

│ │ └─ws

│ │ └─client

│ ├─dao

│ ├─struts

│ └─templates

└─lib

至于每个文件夹的名字,看这篇文章应该都很清楚了,就不用多说。

其中一种方法:

把abc文件夹复制到 tomcat根目录下面的webapps下面,直接启动tomcat后就可以访问了

http://localhost:8080/abc/index.jsp