jsp - Cannot find any information on property in bean... in Hello World -


i'm starting out in jsp in adobe cq , i'm trying simple hello world access data world's simplest bean. i've read, correct. what's going on here?

my jsp (html.jsp) is:

<%@page session="false"         contenttype="text/html;charset=utf-8"         import="org.apache.sling.api.request.responseutil" %> <%@taglib prefix="sling" uri="http://sling.apache.org/taglibs/sling/1.0"%> <sling:defineobjects/> <html>   <body> <jsp:usebean id="mybean" class="com.example.hellobean.sampleutil" >         <jsp:getproperty name="mybean" property="text"/>       </jsp:usebean>   </body> </html> 

and modified template-generated "hello world" class (sampleutil.java) follows:

package com.example.hellobean; public class sampleutil{     private string text;     public sampleutil(){         this.text = "hello world.";     }     public  string gettext() {         return text;     }     public void settext(string text){     this.text = text;     } } 

when accessing page get

cannot find information on property 'text' in bean of type 'com.example.hellobean.sampleutil' 

possibly relevant details: generated in cq using "create project" command in crxdelite on /apps, made working hello world, modified 2 files above.

try rename package name hellobean hellobean everywhere. should contain lower-case letter.


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -