after I import my maven created struts2 project,when I try to add a Action,
the annotation is not auto complete,we need add struts2-codebehind-plugin-2.2.3.jar top build path,then
auto completion with annotation should work.the jar reside in strust2 lib folder.
or add following to project dependencies,otherwise will get a error when compile from command.
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-codebehind-plugin</artifactId>
<version>${struts2.version}</version>
</dependency>
when add annotation to action class,we also need change pom.xml to compile code with source= 1.5,add following plugin in build tag
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
No comments:
Post a Comment