Re: Replacing returns with br
When I try putting the '\\\n' in with the escapeXmL attribute set to false, I get this: org.apache.jasper.JasperException: /filename.jsp(301,2) Attribute escapeXmL invalid for tag out according to TLD Which makes no sense what-so-ever. I tried just putting the escapeXmL=false attribute in with '\n' being my string, and I get my original error. I think the problem may be that it's not seeing \n as the return character from my database. Any ideas? Keith -- Original Message --- From: Pierre Delisle [EMAIL PROTECTED] To: Tag Libraries Users List [EMAIL PROTECTED] Sent: Tue, 13 Apr 2004 18:08:51 -0700 Subject: Re: Replacing returns with br Not very intuitive, but the following should work: c:set var=s5 value=First line\nSecond line/ c:out value=${fn:replace(s5,'\\\n','br')} escapeXml=false/ -- Pierre Keith wrote: I have a column in a database that is used to store a comments section. It's just a large string (VARCHAR2(4000) in Oracle), and the information is entered into it via a textarea form field. If I output that data to another textarea I can see that the return characters are preserved in the database. I was trying to output this column's data as normal text in HTML, but need to preserve the returns somehow. I was thinking I could use the fn:replace action to turn them into br's, but I'm not sure how it sees the return characters in the string. I tried this: c:out value=${fn:replace(row.comments, '\n', 'br')} / But get this error back: org.apache.jasper.JasperException: /filename.jsp(281,2) ${fn:replace (row.comments, '\n', 'br')} contains invalid expression(s): javax.servlet.jsp.el.ELException: Encountered '\n, expected one of [INTEGER_LITERAL, FLOATING_POINT_LITERAL, STRING_LITERAL, true, false, null, (, - , not, !, empty, IDENTIFIER] Anyone help with how I can go about doing this? Thanks! Keith - 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] --- End of Original Message --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Replacing returns with br
you have a typo: the attribute is escapeXml ,not escapeXmL (look at the 'L') -Original Message- From: Keith [mailto:[EMAIL PROTECTED] Sent: 14 April 2004 15:24 To: Tag Libraries Users List Subject: Re: Replacing returns with br When I try putting the '\\\n' in with the escapeXmL attribute set to false, I get this: org.apache.jasper.JasperException: /filename.jsp(301,2) Attribute escapeXmL invalid for tag out according to TLD Which makes no sense what-so-ever. I tried just putting the escapeXmL=false attribute in with '\n' being my string, and I get my original error. I think the problem may be that it's not seeing \n as the return character from my database. Any ideas? Keith -- Original Message --- From: Pierre Delisle [EMAIL PROTECTED] To: Tag Libraries Users List [EMAIL PROTECTED] Sent: Tue, 13 Apr 2004 18:08:51 -0700 Subject: Re: Replacing returns with br Not very intuitive, but the following should work: c:set var=s5 value=First line\nSecond line/ c:out value=${fn:replace(s5,'\\\n','br')} escapeXml=false/ -- Pierre Keith wrote: I have a column in a database that is used to store a comments section. It's just a large string (VARCHAR2(4000) in Oracle), and the information is entered into it via a textarea form field. If I output that data to another textarea I can see that the return characters are preserved in the database. I was trying to output this column's data as normal text in HTML, but need to preserve the returns somehow. I was thinking I could use the fn:replace action to turn them into br's, but I'm not sure how it sees the return characters in the string. I tried this: c:out value=${fn:replace(row.comments, '\n', 'br')} / But get this error back: org.apache.jasper.JasperException: /filename.jsp(281,2) ${fn:replace (row.comments, '\n', 'br')} contains invalid expression(s): javax.servlet.jsp.el.ELException: Encountered '\n, expected one of [INTEGER_LITERAL, FLOATING_POINT_LITERAL, STRING_LITERAL, true, false, null, (, - , not, !, empty, IDENTIFIER] Anyone help with how I can go about doing this? Thanks! Keith - 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] --- End of Original Message --- - 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]
RE: Replacing returns with br
Woops! :p Well, that got rid of the invalid attribute error. But, it's not doing the replacing. It looks like it would if I just did a normal c:out. I just went with a pre tag using a CSS style to change its appearance. Thanks for the help, though! -- Original Message --- From: Felix Velasco [EMAIL PROTECTED] To: 'Tag Libraries Users List' [EMAIL PROTECTED] Sent: Wed, 14 Apr 2004 15:22:53 +0200 Subject: RE: Replacing returns with br you have a typo: the attribute is escapeXml ,not escapeXmL (look at the 'L') -Original Message- From: Keith [mailto:[EMAIL PROTECTED] Sent: 14 April 2004 15:24 To: Tag Libraries Users List Subject: Re: Replacing returns with br When I try putting the '\\\n' in with the escapeXmL attribute set to false, I get this: org.apache.jasper.JasperException: /filename.jsp(301,2) Attribute escapeXmL invalid for tag out according to TLD Which makes no sense what-so-ever. I tried just putting the escapeXmL=false attribute in with '\n' being my string, and I get my original error. I think the problem may be that it's not seeing \n as the return character from my database. Any ideas? Keith -- Original Message --- From: Pierre Delisle [EMAIL PROTECTED] To: Tag Libraries Users List [EMAIL PROTECTED] Sent: Tue, 13 Apr 2004 18:08:51 -0700 Subject: Re: Replacing returns with br Not very intuitive, but the following should work: c:set var=s5 value=First line\nSecond line/ c:out value=${fn:replace(s5,'\\\n','br')} escapeXml=false/ -- Pierre Keith wrote: I have a column in a database that is used to store a comments section. It's just a large string (VARCHAR2(4000) in Oracle), and the information is entered into it via a textarea form field. If I output that data to another textarea I can see that the return characters are preserved in the database. I was trying to output this column's data as normal text in HTML, but need to preserve the returns somehow. I was thinking I could use the fn:replace action to turn them into br's, but I'm not sure how it sees the return characters in the string. I tried this: c:out value=${fn:replace(row.comments, '\n', 'br')} / But get this error back: org.apache.jasper.JasperException: /filename.jsp(281,2) ${fn:replace (row.comments, '\n', 'br')} contains invalid expression(s): javax.servlet.jsp.el.ELException: Encountered '\n, expected one of [INTEGER_LITERAL, FLOATING_POINT_LITERAL, STRING_LITERAL, true, false, null, (, - , not, !, empty, IDENTIFIER] Anyone help with how I can go about doing this? Thanks! Keith - 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] --- End of Original Message --- - 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] --- End of Original Message --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Replacing returns with br
Not very intuitive, but the following should work: c:set var=s5 value=First line\nSecond line/ c:out value=${fn:replace(s5,'\\\n','br')} escapeXml=false/ -- Pierre Keith wrote: I have a column in a database that is used to store a comments section. It's just a large string (VARCHAR2(4000) in Oracle), and the information is entered into it via a textarea form field. If I output that data to another textarea I can see that the return characters are preserved in the database. I was trying to output this column's data as normal text in HTML, but need to preserve the returns somehow. I was thinking I could use the fn:replace action to turn them into br's, but I'm not sure how it sees the return characters in the string. I tried this: c:out value=${fn:replace(row.comments, '\n', 'br')} / But get this error back: org.apache.jasper.JasperException: /filename.jsp(281,2) ${fn:replace (row.comments, '\n', 'br')} contains invalid expression(s): javax.servlet.jsp.el.ELException: Encountered '\n, expected one of [INTEGER_LITERAL, FLOATING_POINT_LITERAL, STRING_LITERAL, true, false, null, (, - , not, !, empty, IDENTIFIER] Anyone help with how I can go about doing this? Thanks! Keith - 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]