文章详情页
idea配置tomcat必坑指南图文详解
浏览:637日期:2023-03-19 16:51:32
创建项目

勾选Web Application

勾选【JavaEE Application】

名字不是主要的

项目结构:

创建一个测试的【servlet】
package com.item.servlet; import javax.servlet.ServletException;import javax.servlet.annotation.WebServlet;import javax.servlet.http.HttpServlet;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;import java.io.IOException; @WebServlet("/GetInfo")public class GetInfoServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {doPost(req, resp); } @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {System.out.println("success"); }}项目结构

添加war包

改成根路径

访问完有显示,说明成功。

到此这篇关于idea配置tomcat必坑指南的文章就介绍到这了,更多相关idea配置tomcat内容请搜索以前的文章或继续浏览下面的相关文章希望大家以后多多支持!
标签:
Tomcat
相关文章:
1. Linux设备之网络驱动介绍2. 最新Windows Server 2012 搭建DNS服务器的详细步骤3. Nginx启动不了原因解决(端口占用)4. 浏览器控制台报错Failed to load module script:解决方法5. Windows Server2012 R2 无法安装.NET Framework 3.5的解决方法6. Tomcat安装使用及部署Web项目的3种方法汇总7. Xshell连接centOS7并与CentOS7联网8. 关于YUM安装部署Zabbix4.4.7使用mysql数据库的问题9. 一篇文章快速掌握Nginx部署前端项目(Nginx安装配置及部署都非常详细!)10. idea配置Tomcat Deployment添加时没有Artifact的问题及解决
排行榜

网公网安备