DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=29809>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=29809 Wrapping HttpServletRequest Summary: Wrapping HttpServletRequest Product: Struts Version: Nightly Build Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: Struts-Faces Library AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] i, i tried the faces-struts-lib with RI. It works. But not with Open-Source-Implementation *MyFaces*. i notices, that in struts-faces the servletPath is a *.do (or that for struts). But it must be an faces-mapping for servlet-Path (*.faces e.g.) the FacesRequestProcessor know if request is for ActionSerclet or not. If not, it delegates it to JSF-Impl. Base of checking is a URI, that is configed in <forward name="success" path="/test.faces"/> (e.g.) so i wrote a simple HttpServletRequestWrapper which wrappes the uri as new ServletPath. now everything is fine. like this (in FacesRequesProcessor) <code> FacesContextFactory fcf = (FacesContextFactory) FactoryFinder.getFactory(FactoryFinder.FACES_CONTEXT_FACTORY); HttpServletRequestWrapper wrapper = new HttpServletRequestWrapper(request,uri); context = fcf.getFacesContext(servlet.getServletContext(), wrapper, response, lifecycle); </code> it is not an error in myfaces-impl. it is an bug in the RI. please see the email of Ted Husted (on myfaces-list) <ted> On Wed, 23 Jun 2004 20:21:49 -0700, [EMAIL PROTECTED] wrote: > the MyFaces implementation is correct in this aspect and I don't think > we should clone the bugs of the RI just because struts relies on them. > I hope spec-compliant does not mean we have to have the same bugs the > RI has ;-)? By the way, if the RI is fixed, struts will not work there > any longer, too. The RI and Struts-Faces were created in tandem, so it's not surprising the same assumptions crop up in each. But, no, specification-compliant does not mean that we should rely on bugs in any implementation, including the RI. In fact, the Struts tradition has been to expose bugs in implementations so that vendors are compelled to fix them. If you develop any patches you would like applied, please bring them to my attention. Once we can get 1.2.1 out-the-door (could be this week), we will be setting up several subprojects, including Struts-Faces, that can be released separately. > So the clean solution from my point of view is to fix the issue in > struts. For example it would be possible to wrap the servlet request > before the FacesContext is created. The wrapper takes the uri of the > view to be displayed to simulate a valid jsf servlet path for the view > manager. What do you think? > > Oliver </ted> and here is the simple wrapper-class: Cheers, Matthias --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
