|
Hi guys,
still trying (failing) to get webwork working with
xdoclet.
I have a basic action that I've hacked from the xdoclet
webwork example,
package xpetstore.web.webwork.actions; /**
* Simple WebWork action. * * @webwork.action
* name="myaction" * error="error.jsp" * input="input.jsp" * success="success.jsp" */ public class Hello implements webwork.action.Action { /** * This method is where the logic of the action is executed. Parameters are passed * by calling set-methods, or by implementing the ParameterAware interface. */ public String execute() { // Simple. Very simple. return SUCCESS; } /**
* @webwork.command * error="error.jsp" * name="add" * success="success.jsp" */ public String doCmd() { return SUCCESS; } } my xdoclet code generates the following views.properties
file:
# Action
views
myaction.action="">myaction.success=success.jsp myaction.error=error.jsp myaction.input=input.jsp myaction.add.action="">myaction.add.success=success.jsp
myaction.add.error=error.jsp However, when I go to my input.jsp file (which is essentially only a forward)
<jsp:forward page="xpetstore.web.webwork.actions.Hello.jsp" />
I get the following error
No view for result [success] exists for action
[xpetstore.web.webwork.actions.Hello])
Now I know that success.jsp works because I can go to it
directly.
I've asked this on the webwork mailing list and they
suggested to extend ActionSupport
instead of implementing Action, and to overwrite doExecute instead of
execute. However
when I did this my views.properties file didn't get created at all
!!!
Any help would be much appreciated
cheers,
Brian
|
