This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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: 17249

then put it into the Session/Model???


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Don't get me started about those stupid light bulbs.
subject: User Spring Bean property in a web page
Similar Threads
spring+hibernate: insert data into database(one to many)
com.sybase.jdbc2.SybConnection: SET CHAINED command not allowed within multi-statement transaction
XML name space error in Spring data JPA hibernate applicationContext.xml
How to Use Spring AOP for Auditing?
Spring-Hibernate transaction management