• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

about Valve in the context file

 
david hu
Ranch Hand
Posts: 143
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am thinking to use Valve element inside the context file of admin application of tomcat, i.e., admin.xml to filter traffic, i.e., only boxes from inside the company can access this admin application.

Inside the admin.xml file which is under the conf/Catalina/localhost, I am trying to put Valve element to filter machine that makes the request to the admin application, I only allows request from inside my company to access this application.

But my question is that how to specify this in the valve element. I read the doc of tomcat, it only specifies the IP address or host names in the valve element. Since the IP address and host names inside my company can be vastly differnt,I cannot think a good way to use regular expression to achieve that.

Any better ideas?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by david hu:

Any better ideas?


Yes, valves are Tomcat specific.
The concept was created before the servlet spec introduced filters.
The two are conceptually the same.

It makes more sense for app developers to write spec compliant (and thus portable) filters instead of container specific valves.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic