You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

IntelliJ IDEA中Tomcat启动报错,JSP应用部署失败求助

Fixing Tomcat Startup Error with JSP Deployment in IntelliJ IDEA

Let's break down the root causes from your logs first:

  • The warning Unknown version string [3.1] is a critical clue: your Tomcat 7.0.56 only supports Servlet 3.0 and below, but your project's configuration is using Servlet 3.1. This mismatch is triggering the subsequent listener and context startup failures.
  • The SEVERE: Error listenerStart is a follow-up issue from the invalid Servlet version, but we’ll cover how to debug it if needed.

Here’s a step-by-step solution:

1. Correct Servlet Version in web.xml

Your web.xml is configured with an incompatible Servlet version. Update it to match Tomcat 7’s supported Servlet 3.0:

<web-app xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
         version="3.0">

Ensure all attributes (namespace, schema location, and version) match the snippet above to avoid configuration parsing errors.

2. Debug Listener Startup Failures (If Needed)

If you still see Error listenerStart after fixing the Servlet version, we need more detailed logs to pinpoint the problematic listener:

  • Navigate to your Tomcat’s conf/logging.properties file
  • Find the line org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level and change its value from INFO to FINE
  • Restart Tomcat—this will log exact exceptions from the failing listener, so you can fix the corresponding class or configuration.

3. Verify IntelliJ Tomcat Configuration

Double-check that your IntelliJ setup aligns with your local Tomcat installation:

  • Open Run/Debug Configurations in IntelliJ
  • Select your Tomcat server instance:
    • Under the Server tab, confirm the Tomcat home points to C:\xampp\tomcat
    • Under the Deployment tab, ensure your Book Manger:war exploded artifact is correctly added and there are no missing dependencies.

4. Clear Caches and Redeploy

Cached files can cause unexpected issues, so let’s clean them up:

  • In IntelliJ, go to File > Invalidate Caches... and choose Invalidate and Restart
  • Delete the work directory in your Tomcat installation (C:\xampp\tomcat\work)—this clears compiled JSPs and temporary runtime files
  • Redeploy your project to Tomcat.

内容的提问来源于stack exchange,提问作者Andrew

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.29 07:05:06