struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Jones <kev.r.jo...@gmail.com>
Subject Struts, Convention plugin and REST plugin
Date Thu, 15 Jul 2010 20:37:48 GMT
I'm having a problem using Struts/Convention/REST together/

I have a class that looks like this

public class PostsController implements Preparable,
		ModelDriven<List<PostViewModel>>
{
}

with two 'action' methods

@Action(results={@Result(name="newpost", location="newpost")})
public String editNew()
{
	return "newpost";
}

@Action(results={@Result(name="posts", location="posts")})
public String index()
{
	return "posts";
}


Originally I only had the index method and it worked fine. After
adding the editNew method the index method has stopped working (the
editNew method works fine).

If I comment out the @Action above the editNew method then the index
method starts working (and the editNew stops working).

Depending on the method that's not working the error I get is "No
result defined for action com.mantiso.jsblog.actions.PostsController
and result newpost"
or "No result defined for action
com.mantiso.jsblog.actions.PostsController and result posts"

Any help would be gratefully accepted,

-- 
Kevin

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message