web.xml inspection - "<servlet-name>*</servlet-name>" is *not* an error
Servlets spec 2.5 allows to specify <servlet-name></servlet-name>* inside <filter-mapping> (http://www.javaworld.com/javaworld/jw-01-2006/jw-0102-servlet.html , couldn't download the spec itself from Sun's site). IDEA highlights '*' with red and says "Cannot resolve Servlet *".
Currently, "Web.xml errors inspection" provides no way to ignore <servlet-name>*</servlet-name> patterns
Please sign in to leave a comment.
Grrr .. Tomcat-6.0.13 doesn't support it. Jetty-6.1.5 does, though ..
Neither does Tomcat 6.0.14 but this time it doesn't even display an error message (6.0.13 was throwing java.lang.IllegalArgumentException: Filter mapping must specify either a <url-pattern> or a <servlet-name>)
Sorryo for offtopic - just thought is might be useful to somebody
Could you file a JIRA request for this?
Suppress for tag?
Sure, http://www.jetbrains.net/jira/browse/IDEA-14592
I'm sorry, Peter, what do you mean by that ? Looking at "Web.xml errors" inspection I see it contain no configuration options (image attached)
Attachment(s):
1.png
Just like you suppress any inspection in java. Put the caret onto the
error, a light bulb appears, click it (or Alt+Enter), press right arrow,
you'll see various suppress actions.
Ah, nice, never used it, thank you !
Hi,
There's another issue with Servlet 2.5 support - multiply <url-pattern> in servlet or filter mapping is now allowed. But "Assembly Descriptor" view of web.xml only displays the first one, see the images attached.
Do you want me to file JIRA for this issue as well ?
P.S.
Btw, I already see how "*" for servlet name in filter mapping is fixed in build 7255 - thanks !
Attachment(s):
1.PNG
2.PNG
And, for those who're interested, it's not supported in JBoss v4.2.0.GA :(
Failed to parse WEB-INF/web.xml; - nested throwable: (org.jboss.deployment.DeploymentException: expected only one url-pattern tag)
So it appears Jetty is the only who's implemented Servlet 2.5 spec correctly (when talking about web.xml changes). Didn't try Geronimo or Glassfish though
Please do this.
http://www.jetbrains.net/jira/browse/IDEA-14728