[ http://www.stripesframework.org/jira/browse/STS-780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ben Gunter updated STS-780: --------------------------- Fix Version/s: Release 1.5.5 Affects Version/s: (was: Release 1.5.3) Release 1.5.4 > ValidationErrorReportResolution error with XHTML > ------------------------------------------------ > > Key: STS-780 > URL: http://www.stripesframework.org/jira/browse/STS-780 > Project: Stripes > Issue Type: Bug > Components: Context Management > Affects Versions: Release 1.5.4 > Reporter: Samuel Santos > Fix For: Release 1.5.5 > > > When you click on a link that causes a validation error, and don't have a > sourcePage parameter in the query string, you'll get the nasty error returned > on the ActionBeanContext#getSourcePageResolution method line 228. > The problem is that ValidationErrorReportResolution writes directly to the > HttpServletResponse writer. > If you use a decoration framework like SiteMesh, you end up with malformed > HTML (e.g. two <html> tag elements). > That along may not be that severe as long as you don't use XHTML and its > draconian error handling, which will immediately cause your site to break. > Since mobile best practices dictate that mobile web applications should > always use the content-type application/xhtml+xml, we need to implement our > own ActionBeanContext and override the method getSourcePageResolution in each > new mobile application we develop: > @Override > public Resolution getSourcePageResolution() { > if (getSourcePage() == null) { > throw new IllegalStateException("Here's how it is. Someone (quite > possibly the Stripes Dispatcher) needed " > + "to get the source page resolution. But no source page was > supplied in the " > + "request, and unless you override > ActionBeanContext.getSourcePageResolution() " > + "you're going to need that value. When you use a > <stripes:form> tag a hidden " + "field called '" > + StripesConstants.URL_KEY_SOURCE_PAGE + "' is included. " > + "If you write your own forms or links that could generate > validation errors, " > + "you must include a value for this parameter. This can be > done by calling " > + "request.getServletPath()."); > } else { > return new ForwardResolution(getSourcePage()); > } > } > This really needs to be fixed in order to fully support XHTML. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://www.stripesframework.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------------ The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book "Blueprint to a Billion" shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev _______________________________________________ Stripes-development mailing list Stripes-development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-development