You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Niels Boldt <ni...@gmail.com> on 2009/03/12 11:50:24 UTC

Rest plugin and 2.1.6 - controllers not mapped

Hi

I have a web application that uses Struts2 2.1.2 and the rest plugin. I'm
developing using a combo of eclipse, maven and tomcat.

However, I have tried to upgrade to 2.1.6 and then the application stops to
work. The problem is that my action classes does not get mapped anymore
after I upgraded.

For instance running 2.1.2 I got the following line outputted during
startup: class:class dk.bc.serverinterface.http.rest.RestController
parent:null current:dk.bc.serverinterface.http.rest

Eg it maps restcontroller to an action. After the update no controllers are
mapped, and all request to the application fails. Is there a fix to this
problem or should I alter my configuration after updating.

Best Regards
Niels
-- 
BinaryConstructors ApS
Vestergade 10a, 4th
1456 Kbh K
Denmark
phone: +4528138757
web: http://www.binaryconstructors.dk
mail: nb@binaryconstructors.dk
skype: nielsboldt

Re: Rest plugin and 2.1.6 - controllers not mapped

Posted by wkbutler <ke...@gmail.com>.
This is combination that I found worked, but using all 2.1.6.

* Name your action *Controller (as you have done)
* Make sure you have a simple struts.xml like is shipped with the
struts2-rest-showcase demo app (packaged with the plugin download) and no
other lingering struts properties
* Make sure your JSP template is available as
       WEB-INF/content/rest-show.jsp     for URL: 
http://server/context/rest/1
       WEB-INF/content/rest-index.jsp     for URL: 
http://server/context/rest

That should be enough. Get this working and then re-introduce your own
Struts mappings and packages.



boldt wrote:
> 
> Hi
> 
> I have a web application that uses Struts2 2.1.2 and the rest plugin. I'm
> developing using a combo of eclipse, maven and tomcat.
> 
> However, I have tried to upgrade to 2.1.6 and then the application stops
> to
> work. The problem is that my action classes does not get mapped anymore
> after I upgraded.
> 
> For instance running 2.1.2 I got the following line outputted during
> startup: class:class dk.bc.serverinterface.http.rest.RestController
> parent:null current:dk.bc.serverinterface.http.rest
> 
> Eg it maps restcontroller to an action. After the update no controllers
> are
> mapped, and all request to the application fails. Is there a fix to this
> problem or should I alter my configuration after updating.
> 
> Best Regards
> Niels
> -- 
> BinaryConstructors ApS
> Vestergade 10a, 4th
> 1456 Kbh K
> Denmark
> phone: +4528138757
> web: http://www.binaryconstructors.dk
> mail: nb@binaryconstructors.dk
> skype: nielsboldt
> 
> 

-- 
View this message in context: http://www.nabble.com/Rest-plugin-and-2.1.6---controllers-not-mapped-tp22474233p22476512.html
Sent from the Struts - User mailing list archive at Nabble.com.


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