myeclipse怎么配置tomcat_myeclipse安装配置tomcat教程
时间:2022-05-14 02:44:57
myeclipse怎么配置tomcat?Meclipse是javaWe企业级开发中最流行的工具,Tomcat服务器可以运行Servlet和JSP,是一个免费的轻量级Web应用服务器,那要怎么使用myeclips对tomcat进行配置呢?来学习下具体的配置教程吧。
myeclipse怎么配置tomcat?
1、打开MyEclipse进行操作,依次选择顶部菜单栏中的“Window”-》“Preferences”。
![myeclipse怎么配置tomcat_myeclipse安装配置tomcat教程](https://img.aspxhome.com/file/2023/4/a310617_0.jpg)
2、在弹出的Preferences对话框中,从左侧依次选择“MyEclipse”-》“Servers”-》“Tomcat”-》“Tomcat 7.x”,如下图所示:
![myeclipse怎么配置tomcat_myeclipse安装配置tomcat教程](https://img.aspxhome.com/file/2023/4/a310617_1.png)
3、将Tomcat 7.x server由原先的Disbale设置为Enable,然后浏览设置Tomcat home directory,然后点击“OK”,如下图所示:
![myeclipse怎么配置tomcat_myeclipse安装配置tomcat教程](https://img.aspxhome.com/file/2023/4/a310617_2.png)
4、依次选择菜单栏中的“Window”-》“Show View”-》“Servers”,如下图所示:
![myeclipse怎么配置tomcat_myeclipse安装配置tomcat教程](https://img.aspxhome.com/file/2023/4/a310617_3.jpg)
5、这样在MyEclipse下方就出现了Servers选项卡,然后Tomcat 7.x出现在列表中,我们点击“Run Server”,如下图所示:
![myeclipse怎么配置tomcat_myeclipse安装配置tomcat教程](https://img.aspxhome.com/file/2023/4/a310617_4.png)
6、启动后,在Console控制台就可以看到Server startup in xxx ms,说明Tomcat启动成功,如下图所示:
![myeclipse怎么配置tomcat_myeclipse安装配置tomcat教程](https://img.aspxhome.com/file/2023/4/a310617_5.png)
7、在Server选项卡中,Tomcat 7.x也显示Run,如下图所示:
![myeclipse怎么配置tomcat_myeclipse安装配置tomcat教程](https://img.aspxhome.com/file/2023/4/a310617_6.jpg)
8、接下来我们在MyEclipse中New一个Web Project,如下图所示:
![myeclipse怎么配置tomcat_myeclipse安装配置tomcat教程](https://img.aspxhome.com/file/2023/4/a310617_7.png)
9、输入项目名称,然后点击“Finish”,如下图所示:
![myeclipse怎么配置tomcat_myeclipse安装配置tomcat教程](https://img.aspxhome.com/file/2023/4/a310617_8.png)
10、这样Web项目中就创建了一个带index.jsp的页面,我们修改显示文本内容,,如下图所示:
![myeclipse怎么配置tomcat_myeclipse安装配置tomcat教程](https://img.aspxhome.com/file/2023/4/a310617_9.png)
11、在Servers选项卡中右键,点击“Add Deployment.。。”,如下图所示:
![myeclipse怎么配置tomcat_myeclipse安装配置tomcat教程](https://img.aspxhome.com/file/2023/4/a310617_10.png)
12、选择我们要部署的项目,以及部署的位置,然后点击“Finish”,如下图所示:
![myeclipse怎么配置tomcat_myeclipse安装配置tomcat教程](https://img.aspxhome.com/file/2023/4/a310617_11.png)
13、这样Web项目部署文件就发布到Tomcat目录下webapps目录,项目的名称就是我们创建的Web Project项目名,下面也有一个index.jsp文件,如下图所示:
![myeclipse怎么配置tomcat_myeclipse安装配置tomcat教程](https://img.aspxhome.com/file/2023/4/a310617_12.jpg)
14、然后我们通过浏览器地址访问jsp页面,如下图所示:
![myeclipse怎么配置tomcat_myeclipse安装配置tomcat教程](https://img.aspxhome.com/file/2023/4/a310617_13.jpg)
15、浏览器页面出现了乱码,依次选择菜单栏中的“Window”-》“Preferences”-》“General”-》“Workspace”,将Text file encoding由原先的Default(GBK)修改为Other(UTF-8),如下图所示:
![myeclipse怎么配置tomcat_myeclipse安装配置tomcat教程](https://img.aspxhome.com/file/2023/4/a310617_14.png)
16、依次选择菜单栏中的“Window”-》“Preferences”-》“General”-》“MyEclipse”-》“Files and Editors”-》“JSP”,将Encoding设置为UTF-8,如下图所示:
![myeclipse怎么配置tomcat_myeclipse安装配置tomcat教程](https://img.aspxhome.com/file/2023/4/a310617_15.png)
17、打开index.jsp页面,将pageEncoding设置为UTF-8,如下图所示:
![myeclipse怎么配置tomcat_myeclipse安装配置tomcat教程](https://img.aspxhome.com/file/2023/4/a310617_16.jpg)
18、再次访问index.jsp页面,中文显示正常,如下图所示:
![myeclipse怎么配置tomcat_myeclipse安装配置tomcat教程](https://img.aspxhome.com/file/2023/4/a310617_17.jpg)
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
excel计算日期差值,DATEDIF函数就够了,你是不是还不知道?
![](https://img.aspxhome.com/file/2023/9/a161249_0s.jpg)
【Safari 小技巧】用2 种隐藏方式给Safari 换背景速度超快
![](https://img.aspxhome.com/file/2023/4/a205044_0s.jpeg)
word 显示两页的方法介绍,通过阅读版式视图实现word显示两页
![](https://img.aspxhome.com/file/2023/3/33323_0s.gif)
Win8电脑连接手机没反应怎么办?
![](https://img.aspxhome.com/file/2023/2/a290924_0s.png)
wps表格快速填充的方法步骤图
微信卸载重装,如何恢复以前的聊天记录?
![](https://img.aspxhome.com/file/2023/3/a196923_0s.png)
Win11如何截长图?Win11电脑截长图教程
![](https://img.aspxhome.com/file/2023/1/a283338_0s.png)
word文加密文件怎么打开
Win10的虚拟内存如何设置?
![](https://img.aspxhome.com/file/2023/26/a221824_0s.jpg)
excel 中的COUNTIF与COUNTIFS按条件统计个数函数使用方法
![](https://img.aspxhome.com/file/2023/0/a162700_0s.png)
苹果电脑怎么进行磁盘管理?mac系统的电脑磁盘
![](https://img.aspxhome.com/file/2023/3/a293088_0s.jpg)
Win10系统如何进入高级启动菜单
![](https://img.aspxhome.com/file/2023/26/a227245_0s.jpg)
Excel开启CSV文件乱码如何解决
Win10系统如何开启和关闭讲述人功能
![](https://img.aspxhome.com/file/2023/26/a227341_0s.jpg)
Word文档竖排文字怎么设置?
![](https://img.aspxhome.com/file/2023/9/32119_0s.jpg)
惠普光影精灵7Victus笔记本重装win11系统教程
![](https://img.aspxhome.com/file/2023/30/a264133_0s.png)
Excel 合并单元格的同时怎样保留所有数值
![](https://img.aspxhome.com/file/2023/4/43404_0s.jpg)
word单元格内容如何拆分?
![](https://img.aspxhome.com/file/2023/4/34374_0s.png)
教你电脑bios在哪里打开
![](https://img.aspxhome.com/file/2023/4/a303729_0s.png)
excel 如何打印工作表中的批注内容?
![](https://img.aspxhome.com/file/2023/6/a140996_0s.jpg)