aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes jsp:useBean Doubt again! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "jsp:useBean Doubt again!" Watch "jsp:useBean Doubt again!" New topic
Author

jsp:useBean Doubt again!

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9427
    
    2

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 ]

SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9427
    
    2

Anyone to help me for my post above??
Ali Gohar
Ranch Hand

Joined: Mar 18, 2004
Posts: 572
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

Joined: Sep 26, 2006
Posts: 9427
    
    2

Thanks.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: jsp:useBean Doubt again!