I have created an action with a method like below:
public class NomenclatureAction extends ActionSupport {
// ...
@Actions({
@Action(value = "ajaxDoStuff",
results = {
@Result(name = ActionSupport.SUCCESS, location = "success.jsp"),
@Result(name = ActionSupport.INPUT, location = "fail.jsp")
}),
@Action(value = "index.action",
results = {
@Result(name = ActionSupport.SUCCESS, location = "success.jsp"),
@Result(name = ActionSupport.INPUT, location = "fail.jsp")
})
})
public final String doStuff() {
// ...
return ActionSupport.SUCCESS;
}
}
I want to call the same method doStuff
with one of the URLs below:
- http://my-server.com/public/namespace/ajaxDoStuff
- http://my-server.com/public/namespace/ajaxDoStuff.action
- http://my-server.com/public/namespace/index
- http://my-server.com/public/namespace/index.action
So far, it works for the first two URLs but not for the last two ones.
What am I missing?