Great, But I'm having the same problem "HTTP status 404"
I've downloaded struts-blank2.2.1 and added jars about restful plugin (struts2-rest-showcase-2.2.1) My struts.xml looks like : <struts> <constant name="struts.enable.DynamicMethodInvocation" value="true" /> <constant name="struts.devMode" value="false" /> <bean type="org.apache.struts2.dispatcher.mapper.ActionMapper" name="pseudoRestful" class="org.apache.struts2.dispatcher.mapper.Restful2ActionMapper"/> <constant name="struts.mapper.class" value="org.apache.struts2.dispatcher.mapper.PrefixBasedActionMapper"/> <constant name="struts.mapper.prefixMapping" value="service:pseudoRestful,:struts"/> <include file="example.xml"/> <package name="default" namespace="/" extends="struts-default"> <default-action-ref name="index" /> <action name="index"> <result type="redirectAction"> <param name="actionName">HelloWorld</param> <param name="namespace">/example</param> </result> </action> </package> <!-- Add packages here --> </struts> And when I try to acces http://localhost:8080/struts221/example/HelloWorld.action, apparently it is driven by restful, because it shows "HTTP status 404" error Maybe i'm missing another config? What am I doing wrong? On Tue, Aug 31, 2010 at 4:05 PM, Dale Newfield <d...@newfield.org> wrote: > On 8/31/10 4:40 PM, Rafael Taboada wrote: > >> I have in my struts.xml >> <bean type="org.apache.struts2.dispatcher.mapper.ActionMapper" >> name="pseudoRestful" >> class="org.apache.struts2.dispatcher.mapper.Restful2ActionMapper"/> >> <constant name="struts.mapper.class" >> value="org.apache.struts2.dispatcher.mapper.PrefixBasedActionMapper"/> >> <constant name="struts.mapper.prefixMapping" >> value="/service:pseudoRestful,:struts"/> >> >> It means, every url that contains 'service' must be mapped with >> Restful2ActionMapper, everything else use default mapping. >> >> Is that correct? What am i missing or doing wrong? >> > > Almost. It means that every request that starts with "/service/" (ignoring > context root) will first be mapped using the Restful2ActionMapper, if that > fails, then it'll be mapped by the standard struts DefaultActionMapper. > Anything that doesn't start with "/service/" will just be mapped by the > standard struts DefaultActionMapper. > > -Dale > -- Rafael Taboada Software Engineer Cell : +511-992741026 "No creo en el destino pues no me gusta tener la idea de controlar mi vida"