java - Action not found, why not? -
i have created action method 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 call same method dostuff
1 of 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, works first 2 urls not last 2 ones.
missing?
the value
attribute should not contain extension.
@action(value = "index.action", results = { @result(name = actionsupport.success, location = "success.jsp"), @result(name = actionsupport.input, location = "fail.jsp") })
you might try http://my-server.com/public/namespace
should handled convention uknown handler, enabled default.
Comments
Post a Comment