struts2 java注解一直出错 @Result这个应该是引用哪个包啊?

package com.test1;
import org.apache.struts2.convention.annotation.Result;
import com.opensymphony.xwork2.ActionSupport;
@Result( value="/HelloWorld.jsp",name="SUCCESS")
public class HelloWorld extends ActionSupport {
private static final String GREETING="Hello";

public String execute(){
    setCustomGreeting(GREETING+" "+getName());
    return "SUCCESS";
}

private String name;
public String getName() {
    return name;
}
public void setName(String name) {
    this.name = name;
}
public String getCustomGreeting() {
    return customGreeting;
}
public void setCustomGreeting(String customGreeting) {
    this.customGreeting = customGreeting;
}

private String customGreeting;

}

2个回答

@org.apache.struts2.convention.annotation.Result

将异常堆栈信息贴出来!

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐