1

In struts project,before going to action class, we can restrict by using filter tag in web .xml and controller tag in struts-config.xml.

what is the difference between these two?, and which one is better, and why?

Roman C
  • 49,761
  • 33
  • 66
  • 176
  • I'm not sure what you're asking. The controller is the Struts 1 mechanism to determine what action gets called. What specifically are you talking about re: a filter? – Dave Newton Mar 24 '15 at 19:11
  • Filters are like filtering something before we proceed and controller is deciding where to flow once our basic conditions are met. Simple english. In details look here http://stackoverflow.com/a/1666906/1844148 http://www.avajava.com/tutorials/lessons/what-is-a-filter-and-how-do-i-use-it.html – Dileep Apr 09 '15 at 12:12

1 Answers1

0

May be you are new to Struts, and by the name Controller, you misunderstood that it controls the user access to the page, which is wrong. Controller in struts is used for action mappings, resource bundling and other things.

vysh
  • 166
  • 1
  • 3
  • 14