I would like to redirect to fail.jsp
when i type my root url (localhost:8081/
). Here is my java class Root :
@Namespaces(value={@Namespace("/User"), @Namespace("/")})
@Result(location="/fail.jsp")
@Actions(value={@Action(""), @Action("home")})
public class Root {
public String execute() throws Exception {
return "success";
}
}
Currently, it redirects me to index.jsp
. Most online tutorials mention the web.xml
but some people tells me it has nothing to do with web.xml
. So i'm confused. May someone help me understand what i'm missing ?
Here is the tree of my app :
Found out i either need an
.xml
setup or a proper Spring & Struts integration to get rid of all xml.Here is the tutorial for the 2nd option