we are using struts in a J2EE application. How can I define a struts
forward mapping to a path with multiple(!) request parameters, i.e.,
<forward name="dspGsre2"
path="/jsp/crm/orousrchfrm.jsp?step=1&y=2"/>
During deployment of the application I get the following error
message. Using only one parameter (step=1) all works fine.
What's wrong?
Thanks in advace, Richard
Pop org.apache.struts.action.ActionForward
Parse Fatal Error at line 118 column 71: The reference to entity "y"
must end with the ';' delimiter.
org.xml.sax.SAXParseException: The reference to entity "y" must end
with the ';'
delimiter.
at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1196
)
at org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XM
LDocumentScanner.java:579)
at org.apache.xerces.framework.XMLDocumentScanner.scanAttValue(XMLDocume
ntScanner.java:516)
at org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumen
tScanner.java:1769)
> Hi,
>
> we are using struts in a J2EE application. How can I define a struts
> forward mapping to a path with multiple(!) request parameters, i.e.,
>
> <forward name="dspGsre2"
> path="/jsp/crm/orousrchfrm.jsp?step=1&y=2"/>
>
> During deployment of the application I get the following error
> message. Using only one parameter (step=1) all works fine.
>
> What's wrong?
>
> Thanks in advace, Richard
>
> Pop org.apache.struts.action.ActionForward
> Parse Fatal Error at line 118 column 71: The reference to entity "y"
> must end with the ';' delimiter.
> org.xml.sax.SAXParseException: The reference to entity "y" must end
> with the ';'
> delimiter.
<snip>
You have broken XML syntax in struts-config.xml with the ampersand
character &. Parser sees &y=2 and automatically thinks &y is an XML entity.
If you need 'real' ampersand (as you do) you should use & , therefore
path="/jsp/crm/orousrchfrm.jsp?step=1&y=2"
might work (haven't tried it, though)
--
Davor Cengija
dcengija...@inet.hr
=============================
"Nicht in die Augen bringen!"
It's failing because the XML parser is interpreting the "&" as the
beginning of an XML entity, rather than an ampersand.
To fix, you should be able to do
<forward name="dspGsre2"
path="/jsp/crm/orousrchfrm.jsp?step=1&y=2"/>
i.e. replace "&" with "&".
Jared