wood burning stoves 2.0*
The moose likes Spring and the fly likes User Spring Bean property in a web page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "User Spring Bean property in a web page" Watch "User Spring Bean property in a web page" New topic

User Spring Bean property in a web page

Brian Enderle

Joined: May 04, 2009
Posts: 2
I have the following bean defined in my project:

<bean id="patronInformation" class="org.oclc.merlins.circulation.ui.patron.PatronSummaryController">
<property name="asyncView" value="jsonView"/>
<property name="currentUser" ref="currentUser"/>
<property name="services" ref="managedServices"/>

I would like to use the property "currentUser" in my webpage (we are using YUI 3 and FreeMarker if that makes a difference).

If I understand Spring (and our project) correctly, currentUser is assigned some data when the user logs in. So within 'currentUser' is the data associated with the user. I would like to use this to display the current user name on the webpage.

Brian Enderle
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17258

then put it into the Session/Model???


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
I agree. Here's the link: http://aspose.com/file-tools
subject: User Spring Bean property in a web page