Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
| Search | Today's Posts | Mark Forums Read
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old June 17th, 2007, 05:24 AM
Registered User
 
Join Date: Jun 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default values between beans

Hi all,
got question about giving variables to Beans

i'v got LoginForm bean with session scope where user login and 'user' entity is set in this bean. on another page i use bean AccountController (scope=request) to addAccount but i don't now how to give the entity 'user' from LoginForm to AccountController. I tried to use jsp:useBean class="bean.AccountController" and setProperty but that create another instance of AccountController and give the entity to it instad of set the right variable in original bean.

Does anybody know how to do it?



<jsp:useBean class="bean.AccountController" id="AC" scope="request" />
<jsp:setProperty name="AC" property="user" value="${LoginForm.user}" />

<c:out value="$AC.user" /> ----- this prints out 'entity.user[51]'
<c:out value="$AccountController.user"> ------ this prints out 'nothing'



Similar Threads
Thread Thread Starter Forum Replies Last Post
Comparing two beans jophy BOOK: Professional Jakarta Struts 1 January 2nd, 2006 09:01 AM
Connection Pooling with Beans angrycat Apache Tomcat 4 September 16th, 2004 06:11 PM
JSP Beans Errors harshadriswadkar JSP Basics 0 September 30th, 2003 06:22 AM
how to start with JSP Beans sanket_shakyavanshi JSP Basics 1 September 30th, 2003 03:39 AM
the order of beans pir8ped BOOK: Expert One-on-One J2EE Design and Development 0 June 10th, 2003 01:47 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.