c:url generates incorrect encoding?
Hello everybody, please have a look at the following JSP/JSTL snippet: a href=c:url value=action.jsp c:param name=param1 value=value1/ c:param name=param2 value=value2/ /c:urlaction/a When requested by an HTTP client, the following response is returned: a href=action.jsp?param1=value1param2=value2action/a Is this correct? I think the ampersand between the two parameters should be escaped, for example by using amp; To be sure, I created a test under http://schildbach.de/test-jstl-c-out.jsp Please use the W3C validator (http://validator.w3.org/) and enter my test URL, and you will get the 6 errors I attached below. Am I doing something wrong? Or is it an error of the JSTL implementation? I am using Tomcat 4.1.27, JDK 1.4.2 and JSTL 1.03 Regards, Andreas Schildbach --- # Line 13, column 81: cannot generate system identifier for general entity param2 ...E16EDEC5EAFDA47DCBBB44?param1=value1param2=value2action/a ^ # Line 13, column 81: general entity param2 not defined and no default entity (explain...). ...E16EDEC5EAFDA47DCBBB44?param1=value1param2=value2action/a ^ # Line 13, column 87: reference not terminated by REFC delimiter ...C5EAFDA47DCBBB44?param1=value1param2=value2action/a ^ # Line 13, column 87: reference to external entity in attribute value ...C5EAFDA47DCBBB44?param1=value1param2=value2action/a ^ # Line 13, column 87: reference to entity param2 for which no system identifier could be generated ...C5EAFDA47DCBBB44?param1=value1param2=value2action/a ^ # Line 13, column 80: entity was defined here ...2E16EDEC5EAFDA47DCBBB44?param1=value1param2=value2action/a - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: c:url generates incorrect encoding?
Hello Iam using a tag library descriptor which is as follows: ? xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE taglib PUBLIC -//Sun Microsystems, Inc.// DTD JSP Tag Library 1.1//EN http://java.sun.com/j2ee/dtds/ web-jsptaglibrary_1_1.dtd !-- a tag library descriptor -- taglib tlibversion1.0/tlibversion jspversion1.1/jspversion shortnamefirst/shortname uri/uri infoA simple tab library for the examples/info tag namehello/name tagclasstags.HelloTag/tagclass bodycontentempty/bodycontent infoSay Hi/info /tag /taglib Iam getting the error: XML parsing error on file /WEB-INF/jsp/mytaglib.tld: (line 4, col 6): The processing instruction target matching [xX][mM][lL] is not allowed. Please give me solutions for this. with regards Ananth R Project Associate Electronic Enterprise Laboratory Computer Science and Automation Indian Institute Of Science Bangalore - Phone:(off) 2932368-111 (cdma)9844140340 e-mail:[EMAIL PROTECTED] [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: c:url generates incorrect encoding?
the problem is the space in the xml header ? xml version=1.0 encoding=ISO-8859-1 ? ^ shuld be ?xml version=1.0 encoding=ISO-8859-1 ? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 19 September 2003 13:49 To: Andreas Schildbach Cc: [EMAIL PROTECTED] Subject: Re: c:url generates incorrect encoding? Hello Iam using a tag library descriptor which is as follows: ? xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE taglib PUBLIC -//Sun Microsystems, Inc.// DTD JSP Tag Library 1.1//EN http://java.sun.com/j2ee/dtds/ web-jsptaglibrary_1_1.dtd !-- a tag library descriptor -- taglib tlibversion1.0/tlibversion jspversion1.1/jspversion shortnamefirst/shortname uri/uri infoA simple tab library for the examples/info tag namehello/name tagclasstags.HelloTag/tagclass bodycontentempty/bodycontent infoSay Hi/info /tag /taglib Iam getting the error: XML parsing error on file /WEB-INF/jsp/mytaglib.tld: (line 4, col 6): The processing instruction target matching [xX][mM][lL] is not allowed. Please give me solutions for this. with regards Ananth R Project Associate Electronic Enterprise Laboratory Computer Science and Automation Indian Institute Of Science Bangalore - Phone:(off) 2932368-111 (cdma)9844140340 e-mail:[EMAIL PROTECTED] [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Newbie question: initializing an array variable
Hi, How do I initialize, using c:set, an array variable, for example an array of 5 ints? In other words, what's the JSTL equivalent of: int[] myArray = new int[5]; for(int i = 0; I myArray.length; i++) { myArray[i] = i; } I know I can print out the contents using c:out value=${myArray[0]} / or in a c:forEach ... statement, but I can't do the above using c:set. I appreciate your help ;) Thanks in advance, Yoav Shapira Millennium ChemInformatics This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]