struts

如果实现了CookiesAware了,还需要引用org.apache.struts2.interceptor.CookieInterceptor过滤器,否则拿不到值
同时还要能看到这样的错误No object in the CompoundRoot has a publicly accessible property named 'JSESSIONID'
解决办法是

1 把struts.devMode设为false
2 增加一个setJSESSIONID(String value)的空方法

spring自动加载

想按名称加载
写成struts.objectFactory.spring.autoWire = name不行,必须写成struts.objectFactory.spring.autoWire = auto

需要写成struts.objectFactory.spring.autoWire = name

private calculatorService cs;
public void setCs1(calculatorService cs){
this.cs = cs;
}

<bean ></bean>

相关文章:

  • 2021-04-04
  • 2021-11-08
  • 2022-12-23
  • 2022-12-23
  • 2021-11-06
  • 2021-10-10
  • 2021-12-20
  • 2021-12-29
猜你喜欢
  • 2022-01-30
  • 2021-06-04
  • 2022-12-23
  • 2022-12-23
  • 2021-11-30
  • 2022-12-23
  • 2021-08-30
相关资源
相似解决方案