struts2 convention 不能导入 @Action(),@results() 等注解

nyliushuI 2011-04-09 10:35:00


package user;

import com.opensymphony.xwork2.Action;
import org.apache.struts2.convention.annotation.Actions;
import org.apache.struts2.convention.*; ///不能导入包
//不能导入包
//错误为 The import org.apache.struts2.convention cannot be resolved
//我导入的包为:
//commons-fileupload-1.2.1.jar
//commons-io-1.3.2.jar
//freemarker-2.3.16.jar
//javassist-3.7.ga.jar
//ognl-3.0.jar
//struts2-core-2.2.1.1.jar
//xwork-core-2.2.1.1.jar
@Action() //不能导入注解
@Results();//不能导入注解
public class UserAction {

private String message;

public String getMessage() {
return message;
}

public void setMessage(String message) {
this.message = message;
}

public String helloWorld(){
return "SUCCESS";
}
}
v
...全文
106 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
nyliushuI 2011-05-25
  • 打赏
  • 举报
回复
struts2-convention-plugin,包没有导.
jinglingcoming 2011-05-24
  • 打赏
  • 举报
回复
我也遇到这个问题 不知道怎么解决 郁闷
  • 打赏
  • 举报
回复
struts2-convention-plugin, 把这个包导入了。

81,095

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧