JSTL accessing properties from java bean -


i'm pretty new jstl bear me. have class created i'm try access properties in jstl. can't figure out i'm doing wrong here. i'm not getting error i"m getting nothing when try call "getchildpath" in java class i'm doing i'm not able access in jstl? appreciated.

java class:

public class childpath{  private string childpath = "";   public childpath(resource resource) throws repositoryexception{          valuemap properties = resource.adaptto(valuemap.class);          childpath = properties.get("childpath", "");                     }        public string getchildpath() {     return childpath; }   

my jstl reference:

${getchildpath} 

first should fix naming follow java naming convention.

say, have passed javabean (type childpath) instance (named bean) jsp, in jsp can reference attribute private string childpath by:

${bean.childpath} 

use attribute/property name instead of method (getter) name.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -