IntelliJ IDEA "Web.xml error" inspection "Cannot resolve symbol" for error-page > location element in web.xml

StackOverflow https://stackoverflow.com/questions/21163872

Question

I'm using IntelliJ IDEA 13 to develop a spring mvc web application. When I define the default error-page location in web.xml like this

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
         version="3.1">
    <error-page>
        <error-code>404</error-code>
        <location>/error-404</location>
    </error-page>
</web-app>

the value of the location attribute gets highlighted like shown in the following screenshot:

expanded inspection information

The path /error-404 seems to get recognized by IDEA, because the Spring Tool Window shows the mapping:

path is recognized by IDEA

Looking at IDEA-30229, I think that IDEA should support paths as value for the location tag.

How do I prevent this inspection to pop up (not disabling it, of course)?

Was it helpful?

Solution

Please file a bug report http://youtrack.jetbrains.com/issues/IDEA and provide your web.xml and dispatcher-servlet.xml files. Thanks.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top