Cannot find any information on property 'x' in a bean of type 'bfs.beans.BFSInfo'

View: New views
9 Messages — Rating Filter:   Alert me  

Cannot find any information on property 'x' in a bean of type 'bfs.beans.BFSInfo'

by Jim Anderson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I'm running tomcat 6.0.18 on Linux and I'm having a problem running
a javabean. I created a bean and was able to call setProperty and
getProperty
for the property 'startPage' in the bean. When I added a 2nd property
to the bean, I got the following message:

org.apache.jasper.JasperException: Cannot find any information on
property 'midContent' in a bean of type 'bfs.beans.BFSInfo'

The setter and getter methods were copied and pasted from 'startPage' so
they
should have worked. I checked the spelling of the new property
'midContent' VERY
carefully and I'm sure there was not a spelling error.

I experimented and found that no matter what name I gave the new
property, it
would not work with the getter and setter methods. In the jsp code, my
getter
and setter methods for 'startPage' continued to work. I decided to rename
the property to 'sPage'. I did this, recompiled the source, rebuilt the
jar file
and placed it the web library. I ran the jsp page again and found that
getProperty
on 'sPage' failed, but if I changed 'sPage' back to 'startPage', the jsp
page
worked.

It looks like tomcat is still is finding an old jar file or has cached a
reference
to the old library.

Does anyone have an suggestions on how to resolve my problem?

Thank you in advance for any help.

Jim Anderson


__________________________________________________________________________

source code:

JSP:

  1 <%@ page contentType="text/html" %>
  2 <jsp:useBean id="BFSInfo" class="bfs.beans.BFSInfo" />
  3 <jsp:setProperty name="BFSInfo" property="startPage" value="page1.jsp"/>
  4 <jsp:setProperty name="BFSInfo" property="midContent"
value="page1Mid.jsp"/>    <-- fails
    .
    .
    .
    BFSINFO is <jsp:getProperty name="BFSInfo" property="startPage" />
    BFSINFO is <jsp:getProperty name="BFSInfo" property="midContent" />


java:

1
  2 package bfs.beans;
  3
  4 import java.io.Serializable;
  5
  6 public class BFSInfo implements Serializable {
  7     private String startPage = "";
  8     private String midContent = "";
  9
 10     public BFSInfo() {
 11     }
 12
 13     public void setStartPage(String s) {
 14         startPage = s;
    BFSINFO is <jsp:getProperty name="BFSInfo" property="startPage" />
    BFSINFO is <jsp:getProperty name="BFSInfo" property="midContent" />


java:

1
  2 package bfs.beans;
  3
  4 import java.io.Serializable;
  5
  6 public class BFSInfo implements Serializable {
  7     private String startPage = "";
  8     private String midContent = "";
  9
 10     public BFSInfo() {
 11     }
 12
 13     public void setStartPage(String s) {
 14         startPage = s;
15     }
 16
 17     public String getStartPage() {
 18         return(startPage);
 19     }
 20
 21     public void setMidContent(String s) {
 22         midContent = s;
 23     }
 24
 25     public String getMidContent() {
 26         return(midContent);
 27     }
 28 }


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Cannot find any information on property 'x' in a bean of type 'bfs.beans.BFSInfo'

by Pid-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 2/7/09 04:25, Jim Anderson wrote:

> Hi,
>
> I'm running tomcat 6.0.18 on Linux and I'm having a problem running
> a javabean. I created a bean and was able to call setProperty and
> getProperty
> for the property 'startPage' in the bean. When I added a 2nd property
> to the bean, I got the following message:
>
> org.apache.jasper.JasperException: Cannot find any information on
> property 'midContent' in a bean of type 'bfs.beans.BFSInfo'
>
> The setter and getter methods were copied and pasted from 'startPage' so
> they
> should have worked. I checked the spelling of the new property
> 'midContent' VERY
> carefully and I'm sure there was not a spelling error.
>
> I experimented and found that no matter what name I gave the new
> property, it
> would not work with the getter and setter methods. In the jsp code, my
> getter
> and setter methods for 'startPage' continued to work. I decided to rename
> the property to 'sPage'. I did this, recompiled the source, rebuilt the
> jar file
> and placed it the web library. I ran the jsp page again and found that
> getProperty

Which "web library" and where did you put the compiled class and "web
library" that contains it?

Are you using a tool like Eclipse or Netbeans?

> on 'sPage' failed, but if I changed 'sPage' back to 'startPage', the jsp
> page
> worked.
>
> It looks like tomcat is still is finding an old jar file or has cached a
> reference
> to the old library.
>
> Does anyone have an suggestions on how to resolve my problem?

> 25 public String getMidContent() {
> 26 return(midContent);
> 27 }

wow. old school.
Not reading a really old tutorial from somewhere are you?

p

> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Cannot find any information on property 'x' in a bean of type 'bfs.beans.BFSInfo'

by Konstantin Kolinko :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/7/2 Jim Anderson <ezjab@...>:

> Hi,
>
> I'm running tomcat 6.0.18 on Linux and I'm having a problem running
> a javabean. I created a bean and was able to call setProperty and
> getProperty
> for the property 'startPage' in the bean. When I added a 2nd property
> to the bean, I got the following message:
>
> org.apache.jasper.JasperException: Cannot find any information on property
> 'midContent' in a bean of type 'bfs.beans.BFSInfo'
>
> The setter and getter methods were copied and pasted from 'startPage' so
> they
> should have worked. I checked the spelling of the new property 'midContent'
> VERY
> carefully and I'm sure there was not a spelling error.
>
> I experimented and found that no matter what name I gave the new property,
> it
> would not work with the getter and setter methods. In the jsp code, my
> getter
> and setter methods for 'startPage' continued to work. I decided to rename
> the property to 'sPage'. I did this, recompiled the source, rebuilt the jar
> file
> and placed it the web library. I ran the jsp page again and found that
> getProperty
> on 'sPage' failed, but if I changed 'sPage' back to 'startPage', the jsp
> page
> worked.
>
> It looks like tomcat is still is finding an old jar file or has cached a
> reference
> to the old library.
>

It looks like you have not restarted (reloaded) your web application.

One of the ways to do so in development mode is to touch your
WEB-INF/web.xml  (or any other WatchedResource if those are configured).

Another way is to use the Tomcat Manager web application.
http://tomcat.apache.org/tomcat-6.0-doc/html-manager-howto.html
http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html


Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


RE: Cannot find any information on property 'x' in a bean of type 'bfs.beans.BFSInfo'

by Caldarale, Charles R :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> From: Pid [mailto:p@...]
> Subject: Re: Cannot find any information on property 'x' in a bean of
> type 'bfs.beans.BFSInfo'
>
> > 25 public String getMidContent() {
> > 26 return(midContent);
> > 27 }
>
> wow. old school.

Don't you love it when people think "return" is a method call?  Can't ever have too many parentheses...

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Cannot find any information on property 'x' in a bean of type 'bfs.beans.BFSInfo'

by David Kerber :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Caldarale, Charles R wrote:

>> From: Pid [mailto:p@...]
>> Subject: Re: Cannot find any information on property 'x' in a bean of
>> type 'bfs.beans.BFSInfo'
>>
>>    
>>> 25 public String getMidContent() {
>>> 26 return(midContent);
>>> 27 }
>>>      
>> wow. old school.
>>    
>
> Don't you love it when people think "return" is a method call?  Can't ever have too many parentheses...
>  
Heh.  I was surprised to find that the parentheses were even allowed,
when one of our programmers used it everywhere.

D



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Cannot find any information on property 'x' in a bean of type 'bfs.beans.BFSInfo'

by Konstantin Kolinko :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/7/2 Caldarale, Charles R <Chuck.Caldarale@...>:

>> From: Pid [mailto:p@...]
>> Subject: Re: Cannot find any information on property 'x' in a bean of
>> type 'bfs.beans.BFSInfo'
>>
>> > 25 public String getMidContent() {
>> > 26 return(midContent);
>> > 27 }
>>
>> wow. old school.
>
> Don't you love it when people think "return" is a method call?  Can't ever have too many parentheses...
>

        if(attr!=null)
            return(attr);
- in o.a.c.connector.Request

Search for "return(" and you will find some other references. ;]


Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


RE: Cannot find any information on property 'x' in a bean of type 'bfs.beans.BFSInfo'

by Caldarale, Charles R :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> From: Konstantin Kolinko [mailto:knst.kolinko@...]
> Subject: Re: Cannot find any information on property 'x' in a bean of
> type 'bfs.beans.BFSInfo'
>
> Search for "return(" and you will find some other references. ;]

Yes, I know; Tomcat (and pretty much all open-source code) is full of bad programming styles.  It was one of the discussion topics when pid, Mark, and I had dinner in London in April - just how much cleanup can you get away with when developing a patch?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Cannot find any information on property 'x' in a bean of type 'bfs.beans.BFSInfo'

by Jim Anderson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Pid wrote:

> On 2/7/09 04:25, Jim Anderson wrote:
>> Hi,
>>
>> I'm running tomcat 6.0.18 on Linux and I'm having a problem running
>> a javabean. I created a bean and was able to call setProperty and
>> getProperty
>> for the property 'startPage' in the bean. When I added a 2nd property
>> to the bean, I got the following message:
>>
>> org.apache.jasper.JasperException: Cannot find any information on
>> property 'midContent' in a bean of type 'bfs.beans.BFSInfo'
>>
>> The setter and getter methods were copied and pasted from 'startPage' so
>> they
>> should have worked. I checked the spelling of the new property
>> 'midContent' VERY
>> carefully and I'm sure there was not a spelling error.
>>
>> I experimented and found that no matter what name I gave the new
>> property, it
>> would not work with the getter and setter methods. In the jsp code, my
>> getter
>> and setter methods for 'startPage' continued to work. I decided to
>> rename
>> the property to 'sPage'. I did this, recompiled the source, rebuilt the
>> jar file
>> and placed it the web library. I ran the jsp page again and found that
>> getProperty
>
> Which "web library" and where did you put the compiled class and "web
> library" that contains it?

In WEB-INF/lib. I compiled the java file in a separate directory and
then copied created the jar file and copied the jar file to WEB-INF/lib
>
> Are you using a tool like Eclipse or Netbeans?

No. I use a makefile based system.

>
>> on 'sPage' failed, but if I changed 'sPage' back to 'startPage', the jsp
>> page
>> worked.
>>
>> It looks like tomcat is still is finding an old jar file or has cached a
>> reference
>> to the old library.
>>
>> Does anyone have an suggestions on how to resolve my problem?
>
>> 25 public String getMidContent() {
>> 26 return(midContent);
>> 27 }
>
> wow. old school.
> Not reading a really old tutorial from somewhere are you?
I'm working out of Java Server Pages, 3rd edition.

>
> p
>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@...
>> For additional commands, e-mail: users-help@...
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Cannot find any information on property 'x' in a bean of type 'bfs.beans.BFSInfo'

by Jim Anderson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Konstantin,

Thank you. That did the trick. I kind of guessed it was that sort of
problem, but could not find it in documentation of the book that I'm using.

Jim

Konstantin Kolinko wrote:

> 2009/7/2 Jim Anderson <ezjab@...>:
>  
>> Hi,
>>
>> I'm running tomcat 6.0.18 on Linux and I'm having a problem running
>> a javabean. I created a bean and was able to call setProperty and
>> getProperty
>> for the property 'startPage' in the bean. When I added a 2nd property
>> to the bean, I got the following message:
>>
>> org.apache.jasper.JasperException: Cannot find any information on property
>> 'midContent' in a bean of type 'bfs.beans.BFSInfo'
>>
>> The setter and getter methods were copied and pasted from 'startPage' so
>> they
>> should have worked. I checked the spelling of the new property 'midContent'
>> VERY
>> carefully and I'm sure there was not a spelling error.
>>
>> I experimented and found that no matter what name I gave the new property,
>> it
>> would not work with the getter and setter methods. In the jsp code, my
>> getter
>> and setter methods for 'startPage' continued to work. I decided to rename
>> the property to 'sPage'. I did this, recompiled the source, rebuilt the jar
>> file
>> and placed it the web library. I ran the jsp page again and found that
>> getProperty
>> on 'sPage' failed, but if I changed 'sPage' back to 'startPage', the jsp
>> page
>> worked.
>>
>> It looks like tomcat is still is finding an old jar file or has cached a
>> reference
>> to the old library.
>>
>>    
>
> It looks like you have not restarted (reloaded) your web application.
>
> One of the ways to do so in development mode is to touch your
> WEB-INF/web.xml  (or any other WatchedResource if those are configured).
>
> Another way is to use the Tomcat Manager web application.
> http://tomcat.apache.org/tomcat-6.0-doc/html-manager-howto.html
> http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html
>
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>
>  


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...