Ciao a tutti,
ho creato la seguente classe:
************************************************** ***********
public class AR
{
int myArray [] = {1, 2, 3, 4, 5, 6};
public int getMyArray(int i)
{
return myArray[i];
}
public void setMyArray(int i, int x)
{
myArray[i] = x;
}
}
************************************************** ************
dopo di che, l` ho inserita all` interno di un bean..
************************************************** *********
<jsp:useBean id="pollo" class="prova.AR" scope="session"/>
************************************************** *********
Quando pero` provo ad accederci con get property, mi da errore, io ci accedo cosi:
************************************************** ******
<jsp:getProperty name="pollo" property="myArray(2)"/>
************************************************** ******
Qualcuno sa dirmi dove sbaglio?...
l` errore restituito e` questo:
***************************************
org.apache.jasper.JasperException: Cannot find any information on property 'myArray(2)' in a bean of type 'prova.AR'
at org.apache.jasper.runtime.JspRuntimeLibrary.getRea dMethod(JspRuntimeLibrary.java:704)
at org.apache.jasper.compiler.Generator$GenerateVisit or.visit(Generator.java
Grazie e ciao...
****************************************