• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp:useBean Doubt again!

 
Joe Harry
Ranch Hand
Posts: 10112
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,

I tried something as below,

index.jsp file



Controller Servlet as below inside doPost,


The result.jsp



When I compiled and ran this program the first time, it gave me jothi shankar kumar sankararaj as the o/p. But when I ran the second time uncommenting the line 1 as above in the controller servlet, it gave me again jothi shankar kumar sankararaj instead of jothi?? Why this happens?? Please help me guys! I'm using netBeans. Does that got something to do with my problem?

[ January 14, 2007: Message edited by: Jothi Shankar Kumar Sankararaj ]

[ January 14, 2007: Message edited by: Jothi Shankar Kumar Sankararaj ]
[ January 14, 2007: Message edited by: Jothi Shankar Kumar Sankararaj ]
 
Joe Harry
Ranch Hand
Posts: 10112
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anyone to help me for my post above??
 
Ali Gohar
Ranch Hand
Posts: 572
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try to use this



By default useBean searches for the bean in page scope and with the same name as in id attribute, you have set attribute in request as "name" and were searching for "person".
 
Joe Harry
Ranch Hand
Posts: 10112
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic