aspose file tools*
The moose likes JSF and the fly likes ReferenceSyntaxException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "ReferenceSyntaxException" Watch "ReferenceSyntaxException" New topic


Timothy Sam
Ranch Hand

Joined: Sep 18, 2005
Posts: 746
Hi guys! I'm trying to access a managed bean from a PhaseListener. I have a utility class that I created so getting a managed bean would be as easy as ABC. The utility class looks like this

My PhaseListener looks like this

my managedbean in faces-config.xml

and I'm getting this exception...

type Exception report


description The server encountered an internal error () that prevented it from fulfilling this request.


javax.servlet.ServletException: loginInfo

root cause

javax.faces.el.ReferenceSyntaxException: loginInfo

note The full stack trace of the root cause is available in the Apache Tomcat/5.5.17 logs.

We don't seem to have much activity here in the JSF forum but I hope someone could explain to me what I'm dong wrong. Thanks!
[ May 09, 2007: Message edited by: Timothy Sam ]

SCJP 1.5 -
Ravindra Rawat
Ranch Hand

Joined: Dec 09, 2004
Posts: 34
Commented code has the answer.

getApplication().createValueBinding expects an value expression like '#{..}' as in the commented code.

But you are passing the variable name from the listener. If you intend to that then you should have a look at ..getApplication().getVariableResolver().

Timothy Sam
Ranch Hand

Joined: Sep 18, 2005
Posts: 746
Thanks! It worked!
I agree. Here's the link:
subject: ReferenceSyntaxException
Similar Threads
JSF: Tracking user views
problem in displaying correct url
Converting byte array to pdfor any filetype using JSF
Save POI Excel file in JSF
nullpointer with @Autowired AuthenticationManager