Within a JSF managed bean, I have the following code taken from this past question:
String uri = "/myAction";
FacesContext.getCurrentInstance().getExternalContext().dispatch(uri);
myAction is the name of a Struts action that is defined in my struts.xml.
However when I access the JSF bean, I am not forwarded to /myAction. Instead I'm getting a 404 http error: The requested resource (/MyApp/myAction) is not available.
Why doesn't it work??
When I try to access /myAction directly from a browser by going to http://localhost:8080/MyApp/myAction all works fine.