I want to start using Struts 2 framework, I download Struts 2.2.3
, and follow this tutorial to make first example, but when I run the index.jsp which has
<%@ taglib prefix="s" uri="/struts-tags" %>
....
<p><a href="<s:url action='hello'/>">Hello World</a></p>
..
This exception occurs:
org.apache.jasper.JasperException: The Struts dispatcher cannot be found. This is usually caused by using Struts tags without the associated filter. Struts tags are only usable when the request has passed through its servlet filter, which initializes the Struts dispatcher needed for this tag. - [unknown location]
I didn’t specify any filters in web.xml because web.xml file wass not created when I create the web application ?! There’s only sun-web.xml file that exists.
From the tutorial which you linked yourself.
Did you read it? Create the web.xml (the IDE should usually already have done it) and declare the filter in there as per the instructions in the tutorial.