You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jason Thurston <ja...@gmail.com> on 2019/05/12 06:23:41 UTC
Unsubcribe
On Saturday, May 11, 2019, M Huzaifah <mh...@gmail.com> wrote:
> Dear All,
>
> i’am stuck how to create /user/{id}/{branch}/{xx} URL Pattern using
> Struts-convention and Struts2-rest plugin.
> there is a way to make it done?
>
> I knew it can be done by using advance wildcard in our struts xml as
> mention in here https://struts.apache.org/core-developers/wildcard-
> mappings.html <https://struts.apache.org/core-developers/wildcard-
> mappings.html>
> i would better to use Annotation in our Action Class like this code below:
>
> @ParentPackage("baseapp")
> @Namespace("/api/test/{id}/{branch}")
> public class UserApi implements ModelDriven<Object> {
>
> private String id;
> private String branch;
> Object resposeModel;
>
> //our setter-getter, index, show, etc method
>
> @Override
> public Object getModel() {
> // TODO Auto-generated method stub
> return resposeModel;
> }
>
>
> }
>
> Regards,,,…..
--
Jason Thurston