Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within OCPJWCD
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Ron McLeod
Paul Clapham
Tim Cooke
Devaka Cooray
Sheriffs:
Liutauras Vilda
paul wheaton
Rob Spoor
Saloon Keepers:
Tim Moores
Stephan van Hulst
Tim Holloway
Piet Souris
Mikalai Zaikin
Bartenders:
Carey Brown
Roland Mueller
Forum:
Web Component Certification (OCEJWCD)
Filter
Deepak Jain
Ranch Hand
Posts: 637
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
<filter> <filter-name>LogInCheck</filter-name> <filter-class>com.example.LogInCheck</filter-class> </filter> <filter-mapping> <filter-name>LogInCheck</filter-name> <url-pattern>*</url-pattern> </filter-mapping>
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.
SCJP, SCWCD, SCBCD
Deepak Jain
Ranch Hand
Posts: 637
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Answer:
<filter-mapping>
<filter-name>LogInCheck</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
/ is a must. I forgot this
SCJP, SCWCD, SCBCD
Listen. That's my theme music. That's how I know I'm a super hero. That, and this tiny ad told me:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Order of Filter Execution
struts-2.1.6 -- 'dojo' is undefined
Problems with servlet filter
what is displaytag filter. How is it used ?
display tag export problem
More...