we have to work with a very specific class in Java that has the following property:
protected SPSExchangedDocumentType spsExchangedDocument;
public SPSExchangedDocumentType getSPSExchangedDocument() {
return spsExchangedDocument;
}
I use the instance of that class inside a jsp page:
<c:out value = "${certificate.spsExchangedDocument.id.value}"/>
It throws me the following exception:
javax.el.PropertyNotFoundException: The class 'un.unece.uncefact.data.standard.spscertificate._5.SPSCertificateType' does not have the property 'spsExchangedDocument'. at javax.el.BeanELResolver.getBeanProperty(BeanELResolver.java:579) at javax.el.BeanELResolver.getValue(BeanELResolver.java:281) at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:175) at com.sun.el.parser.AstValue.getValue(AstValue.java:138) at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:206) at org.apache.jasper.runtime.PageContextImpl.evaluateExpression(PageContextImpl.java:1001)
I think the problem is directly with the fact, that the property is called spsExchangedDocument, but the method is called getSPSExchangedDocument. I cannot change the code of the class, because it's generated automatically from XSD, that we cannot alter, so I should change the page. But what name should I use in order for EL to resolve it properly:
- spsExchangedDocument.
- SPSExchangedDocument.
- sPSExchangedDocument.
What is the rule for such naming conventions in java and EL anyway?