Hallo Hubert,

can you show me the example, and the error stack trace?

The way with the VariableResolver works in my case, with Sun RI and MyFaces. The ValueBinding I've not tried.

There is also an example with tobago:
http://svn.apache.org/viewcvs.cgi/incubator/tobago/trunk/tobago-example/tobago-example-nonfacesrequest/

HTH

Udo

Hubert Rabago schrieb:
I'm working on a servlet based on the code in NonFacesRequestServlet. I read the example in
http://wiki.apache.org/myfaces/InvokingJsfPagesWithStandardUrls.  At
the point where it says "put your initialization stuff here" it shows
using either a VariableResolver (VR) or a ValueBinding (VB) to
retrieve a backing bean.  I tried both approaches in the
invokeApplication() method of NonFacesRequestServlet.

What I found is that using MyFaces, neither of these approaches work.
Using RI, the VR approach works, but the VB approach doesn't.

I don't have the resulting stack trace right now, but I do remember
that MyFaces ends in a NoSuchMethodError.

My question is, is it supposed to work?

Because if you say yes, that means I'm doing something wrong.  If so,
I'll share the entire WAR (or just the service() method I wrote) later
today and ask for further help finding the problem.

If you say it's not supposed to work, then is there another way to get
to a managed bean in this situation?

thanks,
Hubert

ps.
Add'l info:

* The call to NonFacesRequestServlet is the first request in the
application, made directly after server startup.
* I used the Tobago NonFacesRequestServlet as starting point.
* In the invokeAppication() method, I tried using both VB and VR to
retrieve a properly configured backing bean.
* Switching jars from MyFaces to RI allows the VR approach to work.
* The VB approach fails in both implementations.

Reply via email to