struts.xml
<action name="tohome" class="action.ToSmsAction" method="execute">
<result name="success">/pages/home.jsp</result>
<result name="login">/pages/login.jsp</result>
</action>
TosmsAction.java
public class ToSmsAction extends ActionSupport {
private
String time;
public String execute() {
System.out.println(" time is " + getTime());
return SUCCESS;
} else {
return LOGIN;
}
}
public String getTime() {
return time;
}
public void setTime(String time) {
this.time = time;
}
}
if i am not including class="action.ToSmsAction" then it is working good
but when including class="action.ToSmsAction" it is showing following error
HTTP Status 500 -
type Exception report
message
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 3.1.1 logs.