struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From M Huzaifah <mhuzaifah.i...@gmail.com>
Subject How to Strtus2-Rest plugin could create /user/{id}/{branch} URL Pattern
Date Sun, 12 May 2019 05:48:41 GMT
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,,,…..
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message