我先把Exception错误信息贴出来:org.apache.jasper.JasperException: /WEB-INF/jsp/topicAction/addUI.jsp (line: 40, column: 0) Unable to find setter method for attribute: style
通过Exception定位的源代码是:
通过提示我们大概能知道是因为找不到style属性的setter方法,可这个标签是struts2封装的HTML原生标签,但style属性在HTML里使用是完全没问题的,由此我想到可能是struts2封装的问题,于是乎找到struts关于UI标签的源码。如下:
public class AbstractUITagBeanInfo extends SimpleBeanInfo {
private static final Logger LOG =
LoggerFactory.getLogger(AbstractUITagBeanInfo.class);
public PropertyDescriptor[] getP