webwork.devMode设置为true会报ognl异常原因

 

No object in the CompoundRoot has a publicly accessible property named 'index2'

在设置webwork的devMode为true后,启动时出现下列异常:

引用
com.opensymphony.xwork.interceptor.ParametersInterceptor - Developer Notification (set webwork.devMode to false to disable this message):
No object in the CompoundRoot has a publicly accessible property named 'Submit' (no setter could be found)


原因就是devMode下form中的input会在action中找针对input name 的setter(webwork.devMode = false 译注:设置为true时,所有有名字(name)的input都必须有对应的setter),页面jsp中name为Submit的标签在action中没有对应的setter方法所致;解决办法就是注掉devMode true:
Xml代码 复制代码  收藏代码
  1. #webwork.devMode=true  

你可能感兴趣的:(jsp,xml,Webwork)