You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Udo Schnurpfeil <ud...@schnurpfeil.de> on 2006/03/14 22:35:48 UTC

Re: Using VariableResolver or ValueBinding in NonFacesRequestServlet

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.
> 

Re: Using VariableResolver or ValueBinding in NonFacesRequestServlet

Posted by Hubert Rabago <hr...@gmail.com>.
Oh, and Thanks for responding, Udo!

Hubert

On 3/14/06, Hubert Rabago <hr...@gmail.com> wrote:
> Actually I did finally get it to work.  I used it in the filter I
> described on http://marc.theaimsgroup.com/?l=myfaces-user&m=114183050209635&w=2
>
> It turns out I was getting some conflicts because I had a nightly
> build of Commons EL on my war's lib directory.
>
> Hubert
>
> On 3/14/06, Udo Schnurpfeil <ud...@schnurpfeil.de> wrote:
> > 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
> >
>

Re: Using VariableResolver or ValueBinding in NonFacesRequestServlet

Posted by Hubert Rabago <hr...@gmail.com>.
Actually I did finally get it to work.  I used it in the filter I
described on http://marc.theaimsgroup.com/?l=myfaces-user&m=114183050209635&w=2

It turns out I was getting some conflicts because I had a nightly
build of Commons EL on my war's lib directory.

Hubert

On 3/14/06, Udo Schnurpfeil <ud...@schnurpfeil.de> wrote:
> 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
>