From jira-events at lists.jboss.org Tue Jun 8 10:02:38 2010 Content-Type: multipart/mixed; boundary="===============6275014047089464411==" MIME-Version: 1.0 From: Nick Belaevski (JIRA) To: richfaces-issues at lists.jboss.org Subject: [richfaces-issues] [JBoss JIRA] Updated: (RF-7984) I would be nice to have the BaseXML redirecting-code in a util-class Date: Tue, 08 Jun 2010 10:02:38 -0400 Message-ID: <2082002585.3349.1276005758437.JavaMail.tomcat@jira02.app.mwc.hst.phx2.redhat.com> In-Reply-To: 1885516285.1255506905723.JavaMail.jboss@jira01.app.mwc.hst.phx2.redhat.com --===============6275014047089464411== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable [ https://jira.jboss.org/browse/RF-7984?page=3Dcom.atlassian.jira.plug= in.system.issuetabpanels:all-tabpanel ] Nick Belaevski updated RF-7984: ------------------------------- Comment: was deleted (was: Filter is not used in RF anymore. ) > I would be nice to have the BaseXML redirecting-code in a util-class > -------------------------------------------------------------------- > > Key: RF-7984 > URL: https://jira.jboss.org/browse/RF-7984 > Project: RichFaces > Issue Type: Feature Request > Security Level: Public(Everyone can see) = > Components: core > Affects Versions: 3.3.2.GA > Reporter: Andreas H=C3=B6hmann > Assignee: Nick Belaevski > Priority: Minor > > I wrote a special spring security entry point to handle missing authentic= ation *after* a a4j-request: > /** > * {@inheritDoc} > */ > @Override > protected void sendRedirect(final HttpServletRequest theRequest, final = HttpServletResponse theResponse, > final String theUrl) throws IOException { > if (!isAjaxRequest(theRequest)) { > LOG.debug("normal redirect to " + theUrl); > super.sendRedirect(theRequest, theResponse, theUrl); > } else { > LOG.debug("ajax redirect to " + theUrl); > final FilterServletResponseWrapper servletResponseWrapper =3D new F= ilterServletResponseWrapper(theResponse); > final Writer output =3D resetResponse(theResponse, servletResponseW= rapper, "redirect"); > theResponse.setHeader(AjaxContainerRenderer.AJAX_LOCATION_HEADER, t= heUrl); > // For buggy XmlHttpRequest realisations repeat headers in > // > output.write("\n" > + "" + " + AjaxContainerRenderer.AJAX_FLAG_HEADER + "\" content=3D\"redi= rect\" />" + " + AjaxContainerRenderer.AJAX_LOCATION_HEADER + "\" content=3D\"= " + theUrl + "\" />" + ""); > output.flush(); > theResponse.flushBuffer(); > } > } > Currently i'm must copy the redirecting-code from org.ajax4jsf.webapp.Bas= eXMLFilter to reuse it. > It would be nice to have a "A4JResponseUtils" with this methods: > - boolean isAjaxRequest(final ServletRequest request) > - void sendRedirect(final HttpServletRequest theRequest, final HttpServle= tResponse theResponse, final String theUrl) > The advantage of such a utils-class would be a always compatibly thirdpar= ty code (integration code), if the redirecting-code changes in a4j my code = should still work :D -- = This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: htt= ps://jira.jboss.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira = --===============6275014047089464411==--