Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Filter

 
Deepak Jain
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Is the above filter mapping incorrect?
The error i get is
java.lang.IllegalArgumentException: Filter mapping must specify either a <url-pattern> or a <servlet-name>

All am trying is to map every request to go through the above filter.
 
Deepak Jain
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Answer:
<filter-mapping>
<filter-name>LogInCheck</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

/ is a must. I forgot this
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic