[
https://issues.jboss.org/browse/JBIDE-10579?page=com.atlassian.jira.plugi...
]
Viacheslav Kabanovich commented on JBIDE-10579:
-----------------------------------------------
This issue deals with
{code}
<filter-mapping>
<filter-name>compressionFilter</filter-name>
...
</filter-mapping>
{code}
The validation rule checks that web.xml contains corresponding element
{code}
<filter>
...
<filter-name>compressionFilter</filter-name>
...
</filter>
{code}
and nothing more. If such an element is not found, error marker is put to
filter-mapping/filter-name.
Another rule checks that filter/filter-class is a Java class. If not, error marker is put
to filter/filter-class; that has no effect on filter-mapping/filter-name.
There is no rule to check that filter/filter-class implements javax.servlet.Filter. It
would also put error marker to filter/filter-class, and would have no effect on
filter-mapping/filter-name. If you think we need that new rule, please open new issue.
Web.xml validation incorrectly warns on valid filter
----------------------------------------------------
Key: JBIDE-10579
URL:
https://issues.jboss.org/browse/JBIDE-10579
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: jsp/jsf/xml source editing
Affects Versions: 3.3.0.M5
Reporter: Cody Lerum
Assignee: Viacheslav Kabanovich
Fix For: 3.3.0.Beta1
Given the following web.xml snippet eclipse shows a warning for
"filter-name references to compressionFilter that is not a filter"
This may be because
http://code.google.com/p/webutilities/source/browse/tags/webutilities-0.0...
extends
http://code.google.com/p/webutilities/source/browse/tags/webutilities-0.0...
which implements javax.servlet.Filter;
{code}
<filter-mapping>
<filter-name>compressionFilter</filter-name>
<url-pattern>*</url-pattern>
</filter-mapping>
<filter>
<display-name>CompressionFilter</display-name>
<filter-name>compressionFilter</filter-name>
<filter-class>com.googlecode.webutilities.filters.CompressionFilter</filter-class>
<init-param>
<param-name>compressionThreshold</param-name>
<param-value>500</param-value> <!-- compress anything above 1kb -->
</init-param>
<init-param>
<param-name>ignoreURLPattern</param-name>
<param-value>.*\.(flv|mp3|mpg)</param-value> <!-- regex -->
</init-param>
<init-param>
<param-name>ignoreMimes</param-name>
<param-value>images/*,video/*, multipart/x-gzip</param-value> <!--
ignore -->
</init-param>
<init-param>
<param-name>ignoreUserAgentsPattern</param-name>
<param-value>.*MSIE.*</param-value> <!-- regex -->
</init-param>
</filter>
{code}
Here is the maven dep for this filter
{code}
<dependency>
<groupId>com.googlecode.webutilities</groupId>
<artifactId>webutilities</artifactId>
<version>0.0.5</version>
<scope>compile</scope>
</dependency>
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira