Matthias Wessendorf wrote:

Craig,

i tried the struts-faces-example with myfaces
and RI (worked out of the box)

this happens with myfaces:

i clicked LINK "editRegistration.do?action=Create"
and become IllegalArgumentException:

could not find pathMapping for servletPath = /editRegistration.do
requestPathInfo = null
        
net.sourceforge.myfaces.application.jsp.JspViewHandlerImpl.getServletMap
ping(JspViewHandlerImpl.java:407)
        
net.sourceforge.myfaces.application.jsp.JspViewHandlerImpl.renderView(Js
pViewHandlerImpl.java:185)
        
org.apache.struts.faces.application.ViewHandlerImpl.renderView(ViewHandl
erImpl.java:134)
        
net.sourceforge.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.jav
a:282)
        
org.apache.struts.faces.application.FacesRequestProcessor.doForward(Face
sRequestProcessor.java:148)


okay, after that i looked in myfaces JspViewHandlerImpl.java and noticed we only react on FacesServlet-Mappings (eg *.faces, /faces/*,...) i changed it, now it works

but as a result of following discussion on myfaces-mailinglist
(see the three forwards)

i decided to create that wrapper,
that sets requestPath from struts (*do)
to faces (*.faces) now it works again with myfaces and of course RI

so perhaps you have other hints on that?

Matthias


Matthias,

Thanks for the forwards ... I'm going to get out my trusty debugger and walk through this in detail. At first glance, it appears more likely that the problem is in Struts, calculating the view id in the created component tree (the processing should convert "/registration.faces" to "/registration.jsp" in the particular example webapp, before calling ViewHandler.renderView()). If that were to be done, a ViewHandler implementation that relied solely on the view id *should* work, with no wrapper -- we'll see if that prediction comes true or not.

This chunk of code is bringing back bad memories :-) of the work it took to get this to run at all. I see that it needs some more work :-) :-).

The change in servletPath is part of what a RequestDispatcher.forward() call normally does (that's what happens on a normal Struts request). I ran into quite a few difficulties making an RD.forward() to the Faces servlet do the right thing here -- but if using a wrapper ends up being the right solution, there's some other things we'll need to change as well so that it works with a prefix mapped FacesServlet (/faces/*) too.

More news as I debug this further.

Craig

PS: There was an implication in the mail and bug report comments that the RI is violating the spec in its view handler implementation. If it is, I'd like to fix that, and my commit privileges there still work :-). Can you point to any specific place where that might be true?



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to