Reputation: 267040
I'm trying to create a filter, for some reason I am not seeing autocompletion when I create a class that implements a Filter.
When I type:
import javax.servlet
IDEA doesn't seem to pickup the namespace.
Is this a separate .jar that I have to setup in maven?
Update
My filter mappings look like:
<filter>
<filter-name>performancefilter</filter-name>
<filter-class>com.blah.core.filters.PerformanceFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>performancefilter</filter-name>
<url-pattern>/</url-pattern>
</filter-mapping>
Upvotes: 1
Views: 2727
Reputation: 570385
I'm trying to create a filter, for some reason I am not seeing autocompletion when I create a class that implements a Filter.
Then you probably don't have the servlet-api
defined as dependency in your pom.xml
. Assuming you're using Servlet 2.5, your pom.xml
should declare:
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
Upvotes: 3