• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Filter mapping for static files

 
Maneesh Godbole
Saloon Keeper
Posts: 11196
15
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a Tomcat hosted app. I wish to log the IPs of the clients.
I have a static index.html file which I have defined in my web.xml <welcome-file-list>

Now I wrote a simple tracker filter with the following doFilter

and modified my web.xml to


I tried changing the url-pattern to /html /.html and /*html. I do not see the logged information.
What am I doing wrong?
 
Maneesh Godbole
Saloon Keeper
Posts: 11196
15
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Update: Though I am using Tomcat for dev, it is a Google App Engine project. GAE caches and serves static resources to enhance efficiency. I modified the appengine-web.xml to exclude the html file and I can see the IP in the log.
So essentially the url-pattern /* or even/Test.html is correct.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic