This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

class property of a javabean  RSS feed

 
jyotsana dang
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the class property of a javabean. if i have created a bean by the name of userinfo and want to access it in my jsp page.. do i give the whole classpath where the bean is stored..
 
Andres Gonzalez
Ranch Hand
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by jyotsana dang:
what is the class property of a javabean. if i have created a bean by the name of userinfo and want to access it in my jsp page.. do i give the whole classpath where the bean is stored..

hmm.. Have you imported your bean into your jsp page? have you used the useBean tag? I did not fully understand your question
 
jyotsana dang
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes i have imported bean into my jsp page.. bt needed to understand that if i have a userinfo as the bean stored in tomcat/webapps/root/jsp/bean.
when we use <jsp:useBean> tag we set the class as "jsp/bean/UserInfo"
please help
 
Anand Ko
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) I think U can use this syntax :
<jsp:useBean id="<anyname>" class="jsp.bean.userinfo"/> to instantiate userinfo bean and assign to id.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!