Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
JSP - A mailing list about Java Server Pages specification and reference
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Subject: Servlet : Session invalidate
Oracle Connection Pooling in 3 2 2
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Subject: Running a Simple JMS Example
Tomcat and webapplication specific java library path
Mapping in workers2 properties
org apache jasper JasperException
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action
   MESSAGE
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
Value attribute of <html:checkbox
url string for connecting jboss to oracle
javax servlet ServletException: BeanUtils populate
5 0 18: Windows XP Pro vs Windows 2000
HTTP Status 404 The requested resource is not available
 
Subject: JSP handling of single quote

Subject: JSP handling of single quote

2004-12-03       - By R Riluvan

 Back
Reply:     1     2     3     4     5     6  

<html><div style='background-color:'><DIV class=RTE>
<P>It is good to encode the strings with ascii equivalent.<BR><BR></P></DIV>
<DIV></DIV>----Original Message Follows----
<DIV></DIV>From: "Lewis, Sam" &lt;samlewis@(protected)&gt;
<DIV></DIV>Reply-To: An interest list for Sun Java Center J2EE Pattern Catalog
&lt;J2EEPATTERNS-INTEREST@(protected)&gt;
<DIV></DIV>To: J2EEPATTERNS-INTEREST@(protected)
<DIV></DIV>Subject: Re: JSP handling of single quote
<DIV></DIV>Date: Fri, 3 Dec 2004 14:44:28 -0000
<DIV></DIV>MIME-Version: 1.0
<DIV></DIV>Received: from mc10-f8.hotmail.com ([65.54.166.144]) by mc10-s4
.hotmail.com with Microsoft SMTPSVC(5.0.2195.6824); Fri, 3 Dec 2004 07:03:44
-0800
<DIV></DIV>Received: from swjscmail2.java.sun.com ([192.18.99.108]) by mc10-f8
.hotmail.com with Microsoft SMTPSVC(5.0.2195.6824); Fri, 3 Dec 2004 07:03:05
-0800
<DIV></DIV>Received: from swjscmail1 (swjscmail1.Sun.COM [192.18.99.107])by
swjscmail2.java.sun.com (Postfix) with ESMTPid 5474F21C01; Fri,&nbsp;&nbsp;3
Dec 2004 07:55:51 -0700 (MST)
<DIV></DIV>Received: from JAVA.SUN.COM by JAVA.SUN.COM (LISTSERV-TCP/IP release
1.8e) with&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;spool id
48128599 for J2EEPATTERNS-INTEREST@(protected); Fri, 3 Dec&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2004 07:50:41 -0700
<DIV></DIV>Received: from msw2.fdrc.co.uk (unknown [193.129.243.73]) by&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;swjscmail1.java.sun.com
(Postfix) with ESMTP id B0D504A50 for&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&lt;J2EEPATTERNS-INTEREST@(protected)&gt;; Fri,&nbsp;&nbsp;3
Dec 2004 07:40:37 -0700&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;(MST)
<DIV></DIV>Received: from NTSE.hph.local (unverified) by msw2.fdrc.co.uk
(Content&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Technologies
SMTPRS 4.3.17) with ESMTP id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&lt;T6da5d42ebeac19010ddf0@(protected)&gt; for&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;J2EEPATTERNS-INTEREST@(protected)
&gt;; Fri, 3 Dec 2004 14:53:01 +0000
<DIV></DIV>X-Message-Info: y838B63spjy2nyzHYnDsO0qif5isBbpUnOscXpAj3Bg=
<DIV></DIV>X-Original-To: J2EEPATTERNS-INTEREST@(protected)
<DIV></DIV>Delivered-To: J2EEPATTERNS-INTEREST@(protected)
<DIV></DIV>Content-class: urn:content-classes:message
<DIV></DIV>X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0
<DIV></DIV>X-MS-Has-Attach:
<DIV></DIV>X-MS-TNEF-Correlator:
<DIV></DIV>Thread-Topic: JSP handling of single quote
<DIV></DIV>thread-index: AcTZQCo4379JQSoaQ9mC2jMIbepIkAABdhqA
<DIV></DIV>Precedence: list
<DIV></DIV>Return-Path: owner-j2eepatterns-interest@(protected)
<DIV></DIV>X-OriginalArrivalTime: 03 Dec 2004 15:03:06.0132 (UTC) FILETIME=
[319B5540:01C4D949]
<DIV></DIV>
<DIV></DIV>You could:
<DIV></DIV>
<DIV></DIV>1)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Use a preparedstatement which automatically
escapes
<DIV></DIV>characters for you.
<DIV></DIV>
<DIV></DIV>or
<DIV></DIV>
<DIV></DIV>2)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; yourStr.replaceAll( "'", "''" )
<DIV></DIV>
<DIV></DIV>Not really a patterns question though!
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>-- --Original Message-- --
<DIV></DIV>From: An interest list for Sun Java Center J2EE Pattern Catalog
<DIV></DIV>[mailto:J2EEPATTERNS-INTEREST@(protected)] On Behalf Of Kokkilah
<DIV></DIV>Suntharraju
<DIV></DIV>Sent: 03 December 2004 13:48
<DIV></DIV>To: J2EEPATTERNS-INTEREST@(protected)
<DIV></DIV>Subject: JSP handling of single quote
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>Wld like&nbsp;&nbsp;advise here if possible. I'm involved in a jsp
project
<DIV></DIV>currently using sqlserver.
<DIV></DIV>Hv encountered difficulties inserting string values with single
quotes
<DIV></DIV>into sqlserver.
<DIV></DIV>
<DIV></DIV>Example
<DIV></DIV>O'Brien&nbsp;&nbsp;wld only be inserted if it is entered as O''Brien
with two
<DIV></DIV>single quotes.
<DIV></DIV>
<DIV></DIV>Practically this requires parsing of the string variable example
strName
<DIV></DIV>that captures O'Brien to add additional single quote.
<DIV></DIV>
<DIV></DIV>Wld you know any good jsp solution to this do, appreciate your advise
<DIV></DIV>and help
<DIV></DIV>
<DIV></DIV>Thanks
<DIV></DIV>
<DIV></DIV>====================================================================
<DIV></DIV>Companion Site: http://www.corej2eepatterns.com J2EE BluePrints:
<DIV></DIV>http://java.sun.com/blueprints/corej2eepatterns List Archive:
<DIV></DIV>http://archives.java.sun.com/archives/j2eepatterns-interest.html
<DIV></DIV>Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to
<DIV></DIV>listserv@(protected)
<DIV></DIV>
<DIV></DIV>====================================================================
<DIV></DIV>Companion Site: http://www.corej2eepatterns.com
<DIV></DIV>J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
<DIV></DIV>List Archive: http://archives.java.sun.com/archives/j2eepatterns
-interest.html
<DIV></DIV>Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv
@(protected)
<DIV></DIV></div></html>
====================================================================
Companion Site: http://www.corej2eepatterns.com
J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.