string formatting
Hello all, I'm retriving a ntext field from a MS-SQL server DB. In this field can be any character in unicode format with lenght up to 2048 char. When I put on a web page using the c:out value=myrec.row[0].column / I lost any \r\n char that I have in the source record. I use the contentType=text/html;charset=ISO-8859-1. I want to replace that chars with a br of html, but I think that the jstl sql query lost at the beginning that special character. Could you tell me which is the behaviour? Thank you. Andrea Grittini ( mailto:[EMAIL PROTECTED]) Tel: +39-2-97482.1- Fax: +39-2-97482? Computer Design S.r.l., Via Piave 46 - 20010 S.Stefano Ticino - ITALY http://www.cdesign.it/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
forEach in the rt lib question...
I'm trying the following with no luck... c:forEach var=artist items=% playlist.getMP3Artists() % jsp:useBean id=artist type=String / OPTION value=/jsp/view?artist=%= artist %%= artist %/OPTION /c:forEach And what it produces is this OPTION value=/jsp/view?artist=% playlist.getMP3Artists() %% playlist.getMP3Artists() %/OPTION So it's not evalutating the expersion, and I am using the c-rt.tld Thanks, Julia -- [ Julia Anne Case ] [Ships are safe inside the harbor, ] [Programmer at large] [ but is that what ships are really for.] [ Admining Linux ] [ To thine own self be true. ] [ Windows/WindowsNT ] [ Fair is where you take your cows to be judged. ] msg01923/pgp0.pgp Description: PGP signature
Re: forEach in the rt lib question...
On Mon, 8 Apr 2002, Julia A. Case wrote: I'm trying the following with no luck... c:forEach var=artist items=% playlist.getMP3Artists() % jsp:useBean id=artist type=String / OPTION value=/jsp/view?artist=%= artist %%= artist %/OPTION /c:forEach And what it produces is this OPTION value=/jsp/view?artist=% playlist.getMP3Artists() %% playlist.getMP3Artists() %/OPTION So it's not evalutating the expersion, and I am using the c-rt.tld An attribute value that begins % isn't an rtexprvalue; you're instead passing a string literal. Rtexprvalues must begin with %=. Hope that helps, -- Shawn Bayern Author, JSP Standard Tag Library http://www.jstlbook.com (coming this summer from Manning Publications) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: forEach in the rt lib question...
Quoting Shawn Bayern ([EMAIL PROTECTED]): An attribute value that begins % isn't an rtexprvalue; you're instead passing a string literal. Rtexprvalues must begin with %=. Yes, that was it, I knew I was missing something simple... now that I've got it working it is very cool. Thanks, Julia -- [ Julia Anne Case ] [Ships are safe inside the harbor, ] [Programmer at large] [ but is that what ships are really for.] [ Admining Linux ] [ To thine own self be true. ] [ Windows/WindowsNT ] [ Fair is where you take your cows to be judged. ] msg01925/pgp0.pgp Description: PGP signature
c:url clunky
I noticed that c:param's in a c:url are added backwards. So if I have: c:url var=my_url value=http://example.com/script.jsp; c:param name=A1/c:param c:param name=B2/c:param c:param name=C3/c:param /c:url It produces: http://example.com/script.jsp?C=3amp;B=2amp;A=1 This isn't so good because I have an app that expects things a certain way. Also, I've found the whole c:url stuff to be a bit clunky. It would be nice if it accepted body content, something like: c:url var=my_url %@ include file=my_host.jsf %c:out value=${my_var}/ c:param ... etc. Right now I need to create some variables, and do c:url var=my_url value=${my_var} But this is awkward if I have multiple urls, and the params are the same, but the paths are different. Especially so, since the only reason I'm using c:param is that it url encodes strings for me. Maybe what I really want is for c:out to produce multiple encodings, such as XML, URL, WAP, etc. -Steve -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: c:url clunky
On Mon, 8 Apr 2002, Steve Morrison wrote: I noticed that c:param's in a c:url are added backwards. So if I have: c:url var=my_url value=http://example.com/script.jsp; c:param name=A1/c:param c:param name=B2/c:param c:param name=C3/c:param /c:url It produces: http://example.com/script.jsp?C=3amp;B=2amp;A=1 This isn't so good because I have an app that expects things a certain way. This, however, is intentional because it's the only way to emulate the behavior of jsp:include and jsp:param, and this behavior is called for by the JSTL spec. (Later parameters must supercede earlier parameters, and the only way to accomplish this is to make sure that later parameters come first.) The goal is to interoperate well with JSP pages, and this is (unfortunately) incompatible with applications that care about the order of their request parameters and apply a different algorithm for their interpretation than JSP/Servlet does. Also, I've found the whole c:url stuff to be a bit clunky. It would be nice if it accepted body content, something like: c:url var=my_url %@ include file=my_host.jsf %c:out value=${my_var}/ c:param ... etc. Right now I need to create some variables, and do c:url var=my_url value=${my_var} But this is awkward if I have multiple urls, and the params are the same, but the paths are different. Especially so, since the only reason I'm using c:param is that it url encodes strings for me. I'm not sure I'm clear what you're asking for. You'd want the URL base path to come from the body in addition to the 'value' attribute? In principle, this is plausible, although it adds no new functionality -- just a new syntax. Still, I suggest sending that comment to [EMAIL PROTECTED] so that it gets recorded officially. Thanks for the comments, -- Shawn Bayern Author, JSP Standard Tag Library http://www.jstlbook.com (coming this summer from Manning Publications) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]