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,,,…..