struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Thurston <jason.thurs...@gmail.com>
Subject Unsubcribe
Date Sun, 12 May 2019 06:23:41 GMT
On Saturday, May 11, 2019, M Huzaifah <mhuzaifah.ivan@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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message