IDEA配置Tomcat
原创
2020-03-10 20:45
3327
#环境 **`Win10 x64`** **`IDEA Ultimate 2019.1`** **`Java 1.8.0_221`** **`Tomcat 7.0.75`** 如果你使用的是IDEA Community Edition(社区版本)则不带任何Web Application网页应用拓展框架,所以我建议你使用IDEA Ultimate旗舰版试用30天,并通过学生认证获得学生福利正版授权license许可证。获得方法:[https://rawchen.com/life/intellij-idea-student.html][1] 如果你不想使用IDEA,也可以通过Eclipse安装配置Tomcat并搭建JavaWeb程序,不过需要注意的是JSP、Servlet、Tomcat、eclipse之间存在的兼容关系与不同的规范,详情见:[Apache Tomcat的版本][2]。 #下载文件 Tomcat7.0.75.exe安装包:[Tomcat7.0.75.exe][3] 或Tomcat8.5.59.exe安装包:[Tomcat8.5.59.exe][32] IDEA Ultimate 2019.3安装包:[ideaIU-2019.3.4.exe][4] #安装Tomcat服务 ![安装包][5] ![安装包][6] ![安装包][7] ![安装包][8] ![安装包][9] #停止Tomcat 默认系统开启了服务,需要关闭不然运行项目会端口冲突 ![停止Tomcat服务][10] #IDEA新建JavaWeb项目 ![新建项目][11] #IDEA配置Tomcat ![编辑配置][12] ![编辑配置][13] ![编辑配置][14] ![编辑配置][15] ![编辑配置][16] ![编辑配置][17] ![编辑配置][18] ![编辑配置][19] ![构建运行][20] ![完成][21] #添加Tomcat的依赖库 jsp直接输出<% out.print("hello world!") %>会报错,因为没有添加Tomcat本地依赖库。 ![lib库依赖][22] ![lib库依赖][23] ![lib库依赖][24] ![lib库依赖][25] ![lib库依赖][27] ![lib库依赖][28] 至此第一个JavaWeb就完成了 #提示 每次新建Web项目时需添加Tomcat配置以及lib ![新的项目][29] ![新的项目][30] ![新的项目][31] [1]: https://rawchen.com/life/intellij-idea-student.html [2]: http://tomcat.apache.org/whichversion.html [3]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/apache-tomcat-7.0.exe [4]: https://download.jetbrains.8686c.com/idea/ideaIU-2019.3.4.exe [5]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/1.png [6]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/2.png [7]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/3.png [8]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/4.png [9]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/5.png [10]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/6.png [11]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/7.png [12]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/8.png [13]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/9.png [14]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/10.png [15]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/11.png [16]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/12.png [17]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/13.png [18]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/14.png [19]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/15.png [20]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/16.png [21]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/17.png [22]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/22.png [23]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/23.png [24]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/24.png [25]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/25.png [27]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/27.png [28]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/28.png [29]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/18.png [30]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/19.png [31]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/20.png [32]: https://cdn.rawchen.com/2020/03/idea-tomcat-config/apache-tomcat-8.5.59.exe
评 论
阿小州
2021年01月23日
谢谢大佬分享,但是这堆英文看的也是脑袋疼哈哈
回复
sghj
2023年05月08日
牛
回复
目录