#123 AjaxDisplayTag with caracter &

open
nobody
AJAX (9)
5
2013-01-31
2009-10-06
Anonymous
No

Hi, if you change the displaytag_bug.jsp:
Example:
<display:table uid="${now.time}${param.num}" name="pageScope.service.allCars" class="displaytag" pagesize="10" defaultsort="1" defaultorder="descending" export="false" id="row" excludedParams="ajax">
<display:column property="make" title="Make" sortable="true" headerClass="sortable" />
<display:column title="Model" sortable="true" headerClass="sortable" >
<a href="javascript://nop/" class="definition">${row.model}</a>
</display:column>
<display:column title="Link" media="html">
<a href="http://www.${row.make}.com" >${row.make} Web Page</a>
</display:column>
<display:column title="Link" media="xml">www.${row.make}.com</display:column>
<!-- Here, I add more um column with the text "&T" -->
<display:column title="Op" media="html">&T</display:column>
</display:table>

Un error is show up
--------------------------------------------------------------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: org.xml.sax.SAXParseException: The reference to entity "T" must end with the ';' delimiter.
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:521)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:397)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
root cause
javax.servlet.ServletException: javax.servlet.jsp.JspException: org.xml.sax.SAXParseException: The reference to entity "T" must end with the ';' delimiter.
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:846)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
org.apache.jsp.displaytag_jsp._jspService(displaytag_jsp.java:109)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
root cause
org.xml.sax.SAXParseException: The reference to entity "T" must end with the ';' delimiter.
org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
net.sourceforge.ajaxtags.helpers.XMLUtils.getXMLDocument(XMLUtils.java:134)
net.sourceforge.ajaxtags.tags.AjaxAnchorsTag.getDocument(AjaxAnchorsTag.java:134)
net.sourceforge.ajaxtags.tags.AjaxDisplayTag.processContent(AjaxDisplayTag.java:115)
net.sourceforge.ajaxtags.tags.AjaxAreaTag.doEndTag(AjaxAreaTag.java:116)
org.apache.jsp.displaytag_jsp._jspx_meth_ajax_005fdisplayTag_005f0(displaytag_jsp.java:152)
org.apache.jsp.displaytag_jsp._jspService(displaytag_jsp.java:91)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
--------------------------------------------------------------------------------------------------------------------------------------

Cause the &T wasn´t encoded and the parser got the error.

Discussion