Problem

Struts common error messages while access the Struts tag libraries JSP file.

<%@taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>





org.apache.jasper.JasperException: The absolute uri: 
http://struts.apache.org/tags-bean 

org.apache.jasper.JasperException: The absolute uri: 
http://struts.apache.org/tags-html 

org.apache.jasper.JasperException: The absolute uri: 
http://struts.apache.org/tags-logic 

org.apache.jasper.JasperException: The absolute uri: 
http://struts.apache.org/tags-tiles 

cannot be resolved in either web.xml or 
the jar files deployed with this application

Solution

This is because you are not configure the Struts Tag Libraries property, the tld files are not found in your project dependencies.

1. Strut Tag Libraries Manual Configuration

If you are configure the Struts tag libraries manually, used in Struts version <= 1.1 and Servlet < 2.3 container. Please make sure the following “tld” files are copy to WEB-INF folder, you can find these files in your Struts library folder.

  • struts-bean.tld
  • struts-html.tld
  • struts-logic.tld
  • struts-tiles.tld

And define it properly in web.xml
web.xml


...
<taglib>
     <taglib-uri>
	  http://struts.apache.org/tags-bean
     </taglib-uri>
     <taglib-location>
	  /WEB-INF/struts-bean.tld
     </taglib-location>
</taglib>
...

2. Strut Tag Libraries Automatic Configuration

If you are configure the Struts tag libraries automatically, used in Servlet version 2.3/2.4 and Struts 1.2 or 1.3 framework. Make sure the struts-taglib.jar is in your /WEB-INF/lib directory.

You can check the Struts Tag Libraries configuration details here.

3. Eclipse IDE debugging session

If this is happened during Eclipse IDE debugging session, just make sure your project dependencies are deploy to correct folder. Please check this article for the solution.

Conclusion

The cause of the problem may vary in projects, but the solution is always the same

  • Check the tld files are available in WEB-INF (old Struts style).
  • Check taglib uri has no typo error .
  • Check the struts-taglib.jar is available in /WEB-INF/lib or project dependency (new Struts style).