使用@Resource注解,在jsp中不能获取。
我有一个公共类Page,交给spring管理
@Component
public class Page {
......
}Action 也交给spring管理
@Controller @Scope("prototype")
public class TrainCheckTypeAction extends ActionSupport  {
@Resource
private Page page;public String searchTypeByPage() throws Exception{
...
page = trainServiceImpl.getCheckTypeByPage(pageNo, Constant.PAGE_SIZE);
....
}在对应的jsp调用
${page.pageBar} 没有发现值 在<s:debug>中的Value Stack 也看到page的变量只能写page的get和set方法,难道@Resource在这里无效?
还有一个疑问就是Resource是不是只能用于类的注解?