如果在<s:textfield name="${cName}" id="${cName}"/>中是用${……},那么在控制台会报如下的错误:
According to TLD or attribute directive in tag file, attribute disabled does not accept any expressions
解决办法:
把${……}改为%{……};
例如:<s:textfield name="%{cName}" id="%{cName}"/>就可以了!