Linux下Tomcat6.0+MyEclipse8.0+Struts2环境搭建

1.安装Tomcat6.0

[1]下载

从Tomcat官网http://tomcat.apache.org/download-60.cgi 6.0.33 Binary Distributions处下载tar.gz版本。

[2]解压

$ gzip -d apache-tomcat-6.0.33.tar.gz

$ tar xvf apache-tomcat-6.0.33.tar

[3]移动

将tomcat移动到期望的位置,这里移动到/usr/local目录下

$ mv apache-tomcat-6.0.33 /usr/loal/apache-tomcat-6.0.33

[4]设置

# vim /etc/profile

插入export TOMCAT_HOME=/usr/local/apache-tomcat-6.0.33

[5]启动与关闭

启动:# cd /usr/local/apache-tomcat-6.0.33/bin

     # ./startup.sh

关闭:# cd /usr/local/apache-tomcat-6.0.33/bin

     # ./shutdown.sh

2安装MyEclipse8.0

[1]下载myeclipse-8.0.0-linux-gtk-x86.tgz(来自六维)

[2]解压

$ gzip -d myeclipse-8.0.0-linux-gtk-x86.tgz

$ tar xvf myeclipse-8.0.0-linux-gtk-x86.tar

[3]安装

$ cd myeclipse-8.0.0-linux-gtk-x86

$ sudo ./myeclipse-8-stable-installer

[4]配置

运行MyEclipse后,进入Window>>Preferences>>Java>>Installed JREs,导入自己安装的JRE路径。

进入Window>>Preferences>>MyEclipse>>Servers>>Tomcat>>Tomcat 6.x,输入Tomcat所在路径。

在Tomcat 6.x>>JDK,导入自己安装的JRE路径。

3.在MyEclipse8.0中开发Struts2项目

[1]运行MyEclipse,File>>New>>Web Project新建一个Web项目WebTest,注意J2EE Specification Level中选择Java EE 5.0(之前版本不支持Struts2)。

[2]右击项目>>MyEclipse>>Add Struts Capibilities,选择Struts 2.1。

[4]如果用到JSON,则需要从http://sourceforge.net/projects/ezmorph/files/下载ezmorph-1.0.6.jar并导入项目。

posted @ 2011-12-05 20:02  浓得化不开  阅读(687)  评论(0编辑  收藏  举报