You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Eric Seynaeve <es...@abis.be> on 2004/02/20 10:25:24 UTC

Accessing static field using EL

I have problems accessing a static field using the Struts Expression Language.
The goal is to put the names of all the form bean instance names, ... in static
String fields and use those fields throughout as much files as possible. This to
eliminate frantic debugging sessions due to typo's <g>.

This is a code snippet:
public class SessionNumberForm extends AbisDynaActionForm {
	public static final String SESSION_NUMBER = "sessionNr";

	...
}

Here I try to access the field:
<html:text property="${SessionNumberForm.SESSION_NUMBER}" />

but it gives following error:
[ServletException in:/WEB-INF/tiles/index.jsp] No getter method for property
${SessionNumberForm.SESSION_NUMBER} of bean org.apache.struts.taglib.html.BEAN'

How could this field be accessed?

Thanks,

Eric


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org