UrlRewrite Struts2 setting parameter variables
问题 I'm using Tuckey UrlRewrite in combination with a Struts2 application. I'm trying to convert following URL: "/promotions/abcdef-987" to "/dopromotions/detail" passing variable " ID " as 987 My rewrite rule is as follows: <rule> <from>^/(promoties|promotions)/([0-9a-zA-Z\-_]+)-([0-9]+)$</from> <set type="parameter" name="id">$3</set> <to>/dopromotions/detail</to> </rule> And my Struts2 Action has following getters and setters: private Integer id; public void setId(Integer id){ this.id = id; }