I am following this tutorial to create a SEO friendly url with struts2, however in my class
@RequestParameter
public void setId(int id) {
this.id = id;
}
this error shows up on @RequestParameter
RequestParameter cannot be resolved to a type
I have included the struts2-core jara in my web-inf/lib but I am still wondering how come it is returning an error there.
Struts2 does not have any
@RequestParameterin it…You may want to take a look at the Struts2 REST plugin too.
And searching a bit, it turns out that it is a custom Annotation created by the author of the blog post, with the only goal of helping his
IDE,IntelliJ, to avoid highlighting theSettersas unused…@StevenBenitez (that is a SO user too), you better remove your custom
Annotationfrom the other examples in your blog, to avoid confusions on users who have not declared it nor read the blog post in which you describe it 🙂