Hi,
I am new to struts2. I have configured struts2 in Netbeans/Glassfish. Now i am trying to run a simple application. I am getting this error. Please let me know where am i missing.
Find the error that i am getting. Thanks in advance.
HTTP Status 500 - Internal Server Error
type Exception report
messageInternal Server Error
descriptionThe server encountered an internal error that prevented it from fulfilling this request.
exception
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]
root cause
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]
note The full stack traces of the exception and its root causes are available in the GlassFish Server Open Source Edition 4.1 logs.
GlassFish Server Open Source Edition 4.1
This is my web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
<init-param>
<param-name>struts.ognl.allowStaticMethodAccess</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<session-config>
<session-timeout>30</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
And there is my struts.xml
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<!-- Configuration for the default package. -->
<package name="DBAF_pract6ognl" extends="struts-default">
<action name="saludo" class="acciones.SaludoAction">
<result>index.jsp</result>
</action>
<action name="stack" class="acciones.StackAction">
<result>stack.jsp</result>
</action>
<action name="datos" class="acciones.DatosAction">
<result>datos.jsp</result>
</action>
<action name="constantes" class="acciones.ConstantesAction">
<result>constantes.jsp</result>
</action>
</package>
</struts>