as a question, today's project Operation Error
... Nosuchbeandefinitionexception:no Bean named ' Shirofilter '
The exception explained clearly that the Web container did not find the corresponding bean. Then, the query will start from two aspects:
Have a problem with the corresponding XML configuration file?
The specified bean is not found?
Then one after another, and the colleague confirmed after the first problem, because the same code his OK run well. Focus on the second question, along with the XML configuration to find the appropriate class file, are found. This problem is big, configuration good + files are in, is not start, is the need to replace the Web container (some colleagues at this time mentioned their replacement to TOMCAT7 after solving this problem), in my replacement of the previous step, I tried once.
Finally
I tried to succeed, modified the Java file compiled class file storage directory classes. Before adjusting the directory configuration in the Web-inf sibling, adjust to ". /web-inf/classes"The world has since returned to order, stable operation. O (∩_∩) o haha ~
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/59/78/wKioL1TULaGDYdi6AAFbLYDWdxc712.jpg "title=" 976ea0d72990a7876ffb8102aea70631.jpg "width=" 272 "height=" "border=" 0 "hspace=" 0 "vspace=" 0 "style=" WIDTH:272PX; height:200px; "alt=" wkiol1tulagdydi6aafblydwdxc712.jpg "/>
Extended Reading
Why should the classes directory be placed in the Web-inf directory?
A: You must understand the servlet's conventions here. For the problem in question, use the Tomcat container, which is the order in which the class files are loaded.
If a class is to be used, the WEB application tries to load the class into the/web-inf/classes, and, if none, tries to find the class file from the/web-inf/lib jar file (if it is not found yet, it looks in the directory where the container implementation itself holds the class or jar, But the location depends on the implementation of the vendor, and in Tomcat the search path is the Lib directory in the Tomcat installation directory.
So, everybody knows why. We will classes directories and Web-inf directories at the same time, the Web container is not found at all.
Why should the classes directory be placed in the Web-inf directory?