Hi, The json plug in has a package json-default and the "json" result type is defined in this package.
To use this result type you should do some thing like: 1- Make a new package and extend it <package name="myPackage" extends="json-default,rest-default" namespace="/"> 2- Copy and past the <result-type name="json" class="org.apache.struts2.json.JSONResult"/> in my package 3- Make this package the parent package. My question is: If the struts finds the result-type "json",in struts2-json-plugin.jar , why doesn't it make this result-type available to all actions ? Why should I address struts where this result type is defined ? ~Regards, ~~Alireza Fattahi ________________________________ From: Alireza Fattahi <[email protected]> To: Struts Users Mailing List <[email protected]> Sent: Wednesday, 10 July 2013, 10:50 Subject: Re: Using Two Parent Pakages!! Hi, So I define some thing like <package name="myPackage" extends="json-default,rest-default" namespace="/"> </package> Is it possible that I say the struts that this the default package for all packages ?! ~Regards, ~~Alireza Fattahi ________________________________ From: Lukasz Lenart <[email protected]> To: Struts Users Mailing List <[email protected]>; Alireza Fattahi <[email protected]> Sent: Wednesday, 10 July 2013, 10:27 Subject: Re: Using Two Parent Pakages!! 2013/7/10 Alireza Fattahi <[email protected]>: > Thanks ! > > I found a code > here:http://struts.apache.org/release/2.0.x/docs/zero-configuration.html > > > @ParentPackage({"my-parent-package1, my-parent-package2"}) package > com.mycompany.myapp.actions import org.apache.struts2.config.ParentPackage; > > > Can I do it ?! Right, you can extend from more than one package <package name="employee" extends="struts-default,json-default" namespace="/employee"> http://struts.apache.org/release/2.0.x/docs/package-configuration.html Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

