aspose file tools*
The moose likes JSP and the fly likes Property 'someproperty' not found on type java.lang.String Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Property Watch "Property New topic
Author

Property 'someproperty' not found on type java.lang.String

baxhuli pema
Greenhorn

Joined: Nov 09, 2012
Posts: 11
Please if anyone can help me with this error because it is frustrating me.


This is the error that I am getting when the JSP containing this form is called. the "userid" column is in the database and also in the user bean.
Thank you.
Matthew Brown
Bartender

Joined: Apr 06, 2010
Posts: 4240
    
    7

Well, based on that error message it looks like user is not in fact a User object, but is actually a String. Then it tries to access the userid property of the String, which obviously doesn't exist. So I'd suggest looking first at where you declare your user bean.
baxhuli pema
Greenhorn

Joined: Nov 09, 2012
Posts: 11
Thank you for your reply. I thought it too actually but I am not getting any idea because the user bean is accessed by other jsp. I am getting this error only in this case.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18114
    
    8

Nevertheless it's pretty clear from the error message that what Matthew Brown said was completely correct. So now you need to find out why. Looking for reasons why your code is in fact correct or reasons why Matthew was in fact incorrect is not a good strategy at this point.

As for finding out why: something which ran before that code created a "user" property which is a String. Remember that there are several places where the JSP compiler looks for that property (e.g. session scope, request scope, and so on), and you may be assuming that it's in one of those places whereas it's really in another place with higher priority.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Property 'someproperty' not found on type java.lang.String
 
Similar Threads
JSTL tag error
I am getting error when starting Tomcat .How can I rectify it?
Overriding <exception-type> tag in web.xml
user selection not redisplayed after ActionError
no WebApplicationContext found: no ContextLoaderListener registered?