File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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 Soft Skills this week in the Jobs Discussion 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: 9622
    
    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: 9622
    
    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: 9622
    
    2

Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jsp:useBean Doubt again!