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.
Joined: Nov 09, 2012
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.
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.