Return-Path: Delivered-To: apmail-jakarta-taglibs-user-archive@apache.org Received: (qmail 45192 invoked from network); 4 Feb 2003 11:25:22 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 4 Feb 2003 11:25:22 -0000 Received: (qmail 23617 invoked by uid 97); 4 Feb 2003 11:27:00 -0000 Delivered-To: qmlist-jakarta-archive-taglibs-user@nagoya.betaversion.org Received: (qmail 23610 invoked from network); 4 Feb 2003 11:27:00 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 4 Feb 2003 11:27:00 -0000 Received: (qmail 43183 invoked by uid 500); 4 Feb 2003 11:24:53 -0000 Mailing-List: contact taglibs-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tag Libraries Users List" Reply-To: "Tag Libraries Users List" Delivered-To: mailing list taglibs-user@jakarta.apache.org Received: (qmail 43136 invoked from network); 4 Feb 2003 11:24:52 -0000 Received: from unknown (HELO leo.srg-ssr.ch) (146.159.4.100) by daedalus.apache.org with SMTP; 4 Feb 2003 11:24:52 -0000 Received: from moscow.sri.srg-ssr.ch [146.159.48.99] by mail.msc [146.159.22.50] with SMTP (MDaemon.PRO.v5.0.4.R) for ; Tue, 04 Feb 2003 12:24:58 +0100 Received: by moscow.sri.srg-ssr.ch with Internet Mail Service (5.5.2653.19) id ; Tue, 4 Feb 2003 12:24:58 +0100 Message-ID: <513F1D9DFA0CD311BC5B0008C773DC5F034531CF@moscow.sri.srg-ssr.ch> From: Eric.Lewis@swissinfo.ch To: taglibs-user@jakarta.apache.org Subject: RE: Escaping quotes in form fields - c:out doesn't see my variabl e Date: Tue, 4 Feb 2003 12:24:56 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-MDRemoteIP: 146.159.48.99 X-Return-Path: Eric.Lewis@swissinfo.ch X-MDaemon-Deliver-To: taglibs-user@jakarta.apache.org X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Sure, book.getTitle() is the public method, but that's translated into ${book.title} for JSTL. JSTL is smart enough to know that ${book.title} corresponds to book.getTitle(). The only thing that might not have happened is that you set the reference to your object as "book" in your request context. > -----Original Message----- > From: Stephen Riek [mailto:stephenriek@yahoo.co.uk] > Sent: Dienstag, 4. Februar 2003 11:18 > To: Tag Libraries Users List > Subject: RE: Escaping quotes in form fields - c:out doesn't see my > variabl e > > > > book.getTitle() is the public method for my Book class. > book.title is a private String property so it's not accessible. > > Even if book.title were visible, I'm pretty sure that > must be able to use javabean methods as well as properties, > both of which just return a String after all (at least in my case). > > Thanks for trying to help, but the problem still persists. > > Stephen. > > Eric.Lewis@swissinfo.ch wrote: From my understanding, all > you need is to use > [input] escapeXml="false"/>"> > > Note: Not ${book.getTitle()}, but ${book.title} > > Best regards, > Eric > > > -----Original Message----- > > From: Stephen Riek [mailto:stephenriek@yahoo.co.uk] > > Sent: Dienstag, 4. Februar 2003 06:52 > > To: taglibs-user@jakarta.apache.org > > Subject: Escaping quotes in form fields - c:out doesn't see > > my variable > > > > > > > > Sorry for such an easy question but I must be misunderstanding > > the fundamental usage of the JSTL. > > > > How do I get JSTL to output a string which has been formatted > > to escape special characters, so that it is safe to put in a form > > field ? I have tried the following but it does not work- > > > > [input] "> > > > > where 'book' is an instance of a Javabean which I have created > > within a JSP scriptlet like this, > > > > > Book book = new Book(request.getParameter("BookId")); > > book.retrieveValues(); > > %> > > > > As you can see, I do NOT use JSTL's database tags for > > querying databases since I have already wrapped all that > > functionality and business logic inside my Javabeans (in > > this case, the "Book" class). However, it seems that the > > JSTL tag is unable to see my variable 'book' if I > > instantiate it in this way, am I correct ? > > > > I only want to use the tag in order to escape any > > characters (such as ", ', &, \, >) which may upset my > > input tag. Is this overkill or should I use a simple search/replace > > instead ? I hope the solution will work with double-byte > > characters too. > > > > Thank you for bearing with me, > > > > Stephen. > > > > > > > > > > > > > > --------------------------------- > > With Yahoo! Mail you can get a bigger mailbox -- choose a > > size that fits your needs > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: taglibs-user-help@jakarta.apache.org > > > > > --------------------------------- > With Yahoo! Mail you can get a bigger mailbox -- choose a > size that fits your needs > --------------------------------------------------------------------- To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: taglibs-user-help@jakarta.apache.org