cvs commit: jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11 Http11BaseProtocol.java Http11Protocol.java

2005-09-11 Thread costin
costin  2005/09/11 09:25:20

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Added:   http11/src/java/org/apache/coyote/http11
Http11BaseProtocol.java
  Log:
  Small refactoring removing the compile time dependency between http connector 
and jmx.jar.
  It also removes the need to have jmx apis in classpath when running the 
connector, in servers not using jmx.
  
  Http11BaseProtocol is a copy of the old Http11Protocol, with jmx-related code 
removed.
  Http11Protocol has the remaining jmx code.
  
  AprHttp11Protocol can't currently use the base class because all it's classes 
( AprEndpoint, Handler, etc )
  are incompatible.
  
  Revision  ChangesPath
  1.65  +12 -656   
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.64
  retrieving revision 1.65
  diff -u -r1.64 -r1.65
  --- Http11Protocol.java   22 May 2005 17:12:11 -  1.64
  +++ Http11Protocol.java   11 Sep 2005 16:25:20 -  1.65
  @@ -56,98 +56,12 @@
* @author Remy Maucherat
* @author Costin Manolache
*/
  -public class Http11Protocol implements ProtocolHandler, MBeanRegistration
  +public class Http11Protocol extends Http11BaseProtocol implements 
MBeanRegistration
   {
   public Http11Protocol() {
  -cHandler = new Http11ConnectionHandler( this );
  -setSoLinger(Constants.DEFAULT_CONNECTION_LINGER);
  -setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
  -setServerSoTimeout(Constants.DEFAULT_SERVER_SOCKET_TIMEOUT);
  -setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY);
  +super();
   }
   
  -/**
  - * The string manager for this package.
  - */
  -protected static StringManager sm =
  -StringManager.getManager(Constants.Package);
  -
  -/** Pass config info
  - */
  -public void setAttribute( String name, Object value ) {
  -if( log.isTraceEnabled())
  -log.trace(sm.getString(http11protocol.setattribute, name, 
value));
  -
  -attributes.put(name, value);
  -}
  -
  -public Object getAttribute( String key ) {
  -if( log.isTraceEnabled())
  -log.trace(sm.getString(http11protocol.getattribute, key));
  -return attributes.get(key);
  -}
  -
  -public Iterator getAttributeNames() {
  -return attributes.keySet().iterator();
  -}
  -
  -/**
  - * Set a property.
  - */
  -public void setProperty(String name, String value) {
  -setAttribute(name, value);
  -}
  -
  -/**
  - * Get a property
  - */
  -public String getProperty(String name) {
  -return (String)getAttribute(name);
  -}
  -
  -/** The adapter, used to call the connector
  - */
  -public void setAdapter(Adapter adapter) {
  -this.adapter=adapter;
  -}
  -
  -public Adapter getAdapter() {
  -return adapter;
  -}
  -
  -
  -/** Start the protocol
  - */
  -public void init() throws Exception {
  -ep.setConnectionHandler( cHandler );
  -try {
  -checkSocketFactory();
  -} catch( Exception ex ) {
  -log.error(sm.getString(http11protocol.socketfactory.initerror),
  -  ex);
  -throw ex;
  -}
  -
  -if( socketFactory!=null ) {
  -Enumeration attE=attributes.keys();
  -while( attE.hasMoreElements() ) {
  -String key=(String)attE.nextElement();
  -Object v=attributes.get( key );
  -socketFactory.setAttribute( key, v );
  -}
  -}
  -
  -// XXX get domain from registration
  -try {
  -ep.initEndpoint();
  -} catch (Exception ex) {
  -log.error(sm.getString(http11protocol.endpoint.initerror), ex);
  -throw ex;
  -}
  -if(log.isInfoEnabled())
  -log.info(sm.getString(http11protocol.init, getName()));
  -
  -}
   
   ObjectName tpOname;
   ObjectName rgOname;
  @@ -178,460 +92,18 @@
   ( cHandler.global, rgOname, null );
   }
   
  -try {
  -ep.startEndpoint();
  -} catch (Exception ex) {
  -log.error(sm.getString(http11protocol.endpoint.starterror), 
ex);
  -throw ex;
  -}
  -if(log.isInfoEnabled())
  -log.info(sm.getString(http11protocol.start, getName()));
  -}
  -
  -public void pause() throws Exception {
  -try {
  -ep.pauseEndpoint();
  -} catch (Exception ex) {
  -

DO NOT REPLY [Bug 36594] - Hang (infinite loop) in ResourceCache under high load

2005-09-11 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=36594.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36594





--- Additional Comments From [EMAIL PROTECTED]  2005-09-11 18:49 ---
This seems like a good patch, but you should submit diffs rather than full 
files.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 36594] - Hang (infinite loop) in ResourceCache under high load

2005-09-11 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=36594.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36594





--- Additional Comments From [EMAIL PROTECTED]  2005-09-11 21:46 ---
Thanks.  I'll submit diffs as well tomorrow.  I'm not near the code presently.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 36594] - Hang (infinite loop) in ResourceCache under high load

2005-09-11 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=36594.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36594





--- Additional Comments From [EMAIL PROTECTED]  2005-09-11 21:53 ---
(In reply to comment #3)
 Thanks.  I'll submit diffs as well tomorrow.  I'm not near the code presently.

That should be ok, it's just that it's much easier to work with.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Bug report for Tomcat 3 [2005/09/11]

2005-09-11 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=CriticalMAJ=Major |
| |   |   MIN=Minor   NOR=Normal  ENH=Enhancement   |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
| 2350|Ver|Nor|2001-06-27|ServletConfig.getInitParameter() requires url-patt|
| 2478|Opn|Cri|2001-07-06|Passing Session variables between JSP's and Servle|
| 4551|Opn|Nor|2001-10-31|Ctx( /tt01 ): IOException in: R( /tt01 + /com/abc/|
| 4980|New|Min|2001-11-20|Startup message indicates incorrect log file  |
| 4994|New|Nor|2001-11-21|Tomcat needs a mechanism for clean and certain shu|
| 5064|New|Cri|2001-11-25|Socket write error when include files is more than|
| 5108|New|Maj|2001-11-26|Docs for Tomcat 3.2.x appear to be for Tomcat 3.3 |
| 5137|New|Nor|2001-11-27|Null pointer in class loader after attempting to r|
| 5160|Unc|Maj|2001-11-28|'IllegalStateException'   |
| 5331|New|Nor|2001-12-09|getPathInfo vs URL normalization  |
| 5510|New|Blk|2001-12-19|How to call ejb deployed in JBoss from Tomcat serv|
| 5756|New|Nor|2002-01-08|jspc.bat exits with wrong ERRORLEVEL  |
| 5797|New|Nor|2002-01-10|UnCatched ? StringIndexOutOfBoundsException: Strin|
| 6027|New|Maj|2002-01-25|Tomcat  Automatically shuts down as service   |
| 6168|New|Blk|2002-02-01|IllegalStateException |
| 6451|New|Cri|2002-02-14|Stackoverflow |
| 6478|New|Enh|2002-02-14|Default Tomcat Encoding   |
| 6488|Ver|Maj|2002-02-15|Error: 304. Apparent bug in default ErrorHandler c|
| 6648|New|Nor|2002-02-25|jakarta-servletapi build with java 1.4 javadoc err|
| 6702|New|Cri|2002-02-27|win 2k services not working   |
| 6796|New|Cri|2002-03-01|Tomcat dies periodically  |
| 6989|New|Maj|2002-03-08|Unable to read tld file during parallel JSP compil|
| 7013|New|Cri|2002-03-10|Entering a servlet path with non-ISO8859-1 charact|
| 7227|New|Nor|2002-03-19|error-code directive don't work |
| 7626|New|Nor|2002-03-29|classloader not working properly  |
| 7652|New|Cri|2002-04-01|Tomcat stalls periodically|
| 7785|New|Blk|2002-04-06|tomcat bug in context reloading   |
| 7863|New|Maj|2002-04-09|I have a problem when running Tomcat with IIS |
| 8187|New|Cri|2002-04-17|Errors when Tomcat used with MS Access database   |
| 8239|New|Cri|2002-04-18|Resource temporary unavailable|
| 8263|New|Cri|2002-04-18|url-pattern easy to circumvent|
| 9250|New|Maj|2002-05-20|outOfMemoryError  |
| 9367|New|Maj|2002-05-23|HttpSessionBindingEvent not thrown for HttpSession|
| 9390|New|Nor|2002-05-24|jasper compilation error in tomcat|
| 9480|New|Nor|2002-05-29|Data connection pooling   |
| 9607|New|Maj|2002-06-04|precompile JSP|
| 9737|Ver|Nor|2002-06-10|ArrayIndexOutOfBoundsException when sending just p|
|10047|New|Cri|2002-06-20|IllegalStateException |
|10202|New|Maj|2002-06-25|Tomcat is not responding in time  |
|10357|Unc|Blk|2002-06-30|java.lang.IllegalArgumentException: Short Read|
|10406|New|Cri|2002-07-02|IllegalStateException |
|11087|New|Blk|2002-07-23|IllegalStateException |
|11286|New|Maj|2002-07-30|Tomcat threads not respond if increase JVM size   |
|11466|New|Nor|2002-08-05|ContextManager: SocketException reading request   |
|12156|New|Cri|2002-08-29|Apache and Tomcat 3.3.1 Interworking problem  |
|12194|New|Maj|2002-08-30|Tomcat does not send WWW-Authenticate header  |
|12852|New|Nor|2002-09-20|May be error in _jspService() - out.flushBuffers(|
|14386|New|Maj|2002-11-08|Date headers corrupted using setDateHeader|
|15632|New|Nor|2002-12-23|Problem with the Tomcat Sessions Parameter on URL |
|16363|New|Cri|2003-01-23|Stack Overflow accessing compiled JSP - Tomcat 3.2|
|17081|New|Min|2003-02-14|Some javadoc comment fixes|

Bug report for Tomcat 4 [2005/09/11]

2005-09-11 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=CriticalMAJ=Major |
| |   |   MIN=Minor   NOR=Normal  ENH=Enhancement   |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
| 3839|Opn|Enh|2001-09-26|Problem bookmarking login page|
| 4227|Opn|Enh|2001-10-17|Invalid CGI path  |
| 5329|New|Enh|2001-12-08|NT Service exits startup before Tomcat is finished|
| 5795|New|Enh|2002-01-10|Catalina Shutdown relies on localhost causing prob|
| 5829|New|Enh|2002-01-13|StandardManager needs to cope with sessions throwi|
| 5985|New|Enh|2002-01-23|Tomcat should perform a more restrictive validatio|
| 6600|Opn|Enh|2002-02-20|enodeURL adds 'jsession' when 'isRequestedSessionI|
| 6614|New|Enh|2002-02-21|Have Bootstrap and StandardClassLoader use the sam|
| 6671|New|Enh|2002-02-25|Simple custom tag example uses old declaration sty|
| 7043|New|Enh|2002-03-12|database user and password for JDBC Based Store   |
| 7374|New|Enh|2002-03-22|Apache Tomcat/4.0.1 message on standard output|
| 7676|New|Enh|2002-04-02|Allow name property to use match experssions in h|
| 7723|New|Enh|2002-04-03|[patch] additional factory for org.apache.naming.f|
| 7831|New|Nor|2002-04-08|[PATCH] JNDIRealm does not work with CLIENT-CERT a|
| 8026|New|Enh|2002-04-12|Exceptions in StandardHostDeployer.addChild are lo|
| 8323|New|Enh|2002-04-20|No support for running the 64 bit JVM |
| 8343|New|Enh|2002-04-21|adding a absorber logger class to org.apache.ca|
| 8441|New|Enh|2002-04-23|Command line files for NetWare|
| 8705|New|Enh|2002-05-01|SessionListener should extend EventListener   |
| 8744|New|Enh|2002-05-02|No way to configure/extend runtime classloaders.  |
| 8776|New|Enh|2002-05-03|The session url encoding under somce circumstances|
| 9027|New|Cri|2002-05-13|The Tomcat Servlet Container use the identity spec|
| 9227|New|Enh|2002-05-19|Allow an empty value of a pathname in the Standard|
| 9456|New|Enh|2002-05-28|Problem saving server.xml file: invalid XML markup|
| 9511|New|Enh|2002-05-30|Object instantiation optimization in StandardSessi|
| 9629|New|Enh|2002-06-05|Fix ServletContext.getResourcePaths to match spec |
| 9745|New|Enh|2002-06-10|extern cache mgt bug for conditionally dynamic pag|
| 9852|New|Enh|2002-06-13|Odd Digest and Realm Behaviour|
|10021|New|Enh|2002-06-19|Include upgrade option in installer   |
|10026|Opn|Nor|2002-06-19|manager/stop and manager/remove   |
|10060|New|Enh|2002-06-20|Make the common and shared class loaders look in c|
|10120|New|Enh|2002-06-21|Custom realm and shared instalation.  |
|10225|New|Enh|2002-06-25|ANT Tasks Error Situation |
|10335|New|Enh|2002-06-28|[RFE,patch] Make JAASRealm more flexible  |
|10457|New|Enh|2002-07-03|Patch submission for DefaultServlet/WebdavServlet |
|10526|New|Enh|2002-07-06|Authenticators do not always cache the Principal  |
|10541|New|Nor|2002-07-08|Content-length header should be automatically set |
|10565|Opn|Enh|2002-07-08|shutdown hook problem:  java.lang.NoClassDefFoundE|
|10691|New|Enh|2002-07-11|staring tomcat gives indication that tomcat is sta|
|10699|New|Enh|2002-07-11|Apache SOAP 2.3 will not operate properly |
|10972|New|Enh|2002-07-19|Realm without className in server.xml produces N|
|11069|Opn|Enh|2002-07-23|Tomcat not flag error if tld is outside of /WEB-IN|
|11129|New|Enh|2002-07-24|New valve for putting the sessionIDs in the reques|
|11248|New|Enh|2002-07-29|DefaultServlet doesn't send expires header|
|11754|Opn|Enh|2002-08-15|Synchronous shutdown script - shutdown.sh should w|
|12069|New|Enh|2002-08-27|Creation of more HttpSession objects for one previ|
|12428|Opn|Maj|2002-09-09|request.getUserPrincipal(): Misinterpretation of s|
|12658|New|Enh|2002-09-15|a proxy host and port at the Host element level |
|12766|New|Enh|2002-09-18|Tomcat should use tld files in /WEB-INF/ over vers|
|13040|New|Nor|2002-09-26|can't retrieve external context who's uri is a sub|
|13309|Opn|Enh|2002-10-04|Catalina calls System.exit()  |

Bug report for Watchdog [2005/09/11]

2005-09-11 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=CriticalMAJ=Major |
| |   |   MIN=Minor   NOR=Normal  ENH=Enhancement   |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
|  278|Unc|Nor|2000-12-04|Bug in GetParameterValuesTestServlet.java file Bug|
|  279|Unc|Nor|2000-12-04|Logical Error in GetParameterValuesTestServlet Bug|
|  469|Unc|Nor|2001-01-17|in example-taglib.tld urn should be uri BugRat|
|  470|Unc|Nor|2001-01-17|FAIL positiveForward.jsp and positiveInclude.jsp B|
| 9634|New|Enh|2002-06-05|No tests exist for ServletContext.getResourcePaths|
|10703|New|Enh|2002-07-11|Need to test getRequestURI after RequestDispatcher|
|11336|New|Enh|2002-07-31|Test wrapped path methods with RD.foward()|
|11663|New|Maj|2002-08-13|JSP precompile tests rely on Jasper specific behav|
|11664|New|Maj|2002-08-13|A sweep is needed of all Watchdog 4.0 tag librarie|
|11665|New|Maj|2002-08-13|ServletToJSPErrorPageTest and ServletToServletErro|
|11666|New|Maj|2002-08-13|SetBufferSize_1TestServlet is invalid.|
|14004|New|Maj|2002-10-28|Incorrent behaviour of all attribute-related lifec|
|15504|New|Nor|2002-12-18|JSP positiveGetValues test relies on order preserv|
|24649|New|Nor|2003-11-12|getRemoteHost fails when agent has uppercase chara|
|29398|New|Nor|2004-06-04|Update site and note current status   |
+-+---+---+--+--+
| Total   15 bugs   |
+---+

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core LocalStrings.properties StandardContext.java

2005-09-11 Thread billbarker
billbarker2005/09/11 17:19:39

  Modified:catalina/src/share/org/apache/catalina/core
LocalStrings.properties StandardContext.java
  Log:
  Per section 13.2 of the spec, warn if CR or LF is found in a url-pattern.
  
  Fix for Bug #36599
  
  Revision  ChangesPath
  1.24  +1 -0  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/LocalStrings.properties
  
  Index: LocalStrings.properties
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/LocalStrings.properties,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- LocalStrings.properties   1 Aug 2005 12:13:59 -   1.23
  +++ LocalStrings.properties   12 Sep 2005 00:19:38 -  1.24
  @@ -46,6 +46,7 @@
   standardContext.applicationListener=Error configuring application listener 
of class {0}
   standardContext.applicationSkipped=Skipped installing application listeners 
due to previous error(s)
   standardContext.badRequest=Invalid request path ({0}).
  +standardContext.crlfinurl=The URL pattern {0} contains a CR or LF and so 
can never be matched.
   standardContext.errorPage.error=Error page location {0} must start with a 
''/''
   standardContext.errorPage.required=ErrorPage cannot be null
   standardContext.errorPage.warning=WARNING: Error page location {0} must 
start with a ''/'' in Servlet 2.4
  
  
  
  1.176 +4 -1  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java
  
  Index: StandardContext.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
  retrieving revision 1.175
  retrieving revision 1.176
  diff -u -r1.175 -r1.176
  --- StandardContext.java  27 Jul 2005 15:11:21 -  1.175
  +++ StandardContext.java  12 Sep 2005 00:19:38 -  1.176
  @@ -4827,6 +4827,9 @@
   
   if (urlPattern == null)
   return (false);
  +if (urlPattern.indexOf('\n') = 0 || urlPattern.indexOf('\r') = 0) {
  +
getLogger().warn(sm.getString(standardContext.crlfinurl,urlPattern));
  +}
   if (urlPattern.startsWith(*.)) {
   if (urlPattern.indexOf('/')  0)
   return (true);
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 36599] - CR, LF in URL

2005-09-11 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=36599.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36599


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED
Summary|CR, LF in URL   |CR, LF in URL




--- Additional Comments From [EMAIL PROTECTED]  2005-09-12 02:21 ---
The example isn't valid (since the first bullet point of 13.2 says that 
leading and trailing ws must be stripped).  However, the bug is valid, since 
Tomcat doesn't WARN for the case of:
  url-pattern/foo
   /bar
  /url-pattern

This is fixed now in the CVS and will appear in 5.5.12.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



PreparedStatement Unicode MySQL

2005-09-11 Thread Paul Wallace
Hi,
I am having trouble inserting and retrieving Asian characters in my
MySQL DB using PreparedStatement. I have set up my table thus:
 
CREATE TABLE `messages` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `message_body` text NOT NULL,
  `sender_number` text NOT NULL,
  `shortcode` text NOT NULL,
  `image` longblob,
  PRIMARY KEY  (`id`)
) CHARACTER SET utf8 TYPE=MyISAM; 
 
and am inserting using a PreparedStatement -
pstmt.setString(indexOfColumnInQuestion, asianTextString); to insert in
to message_body. However, when viewing the column in the query browser,
and retrieving it from a ResultSet, it reads ? ???  and
so on (I am attempting to insert Thai characters in this instance).
 
Is there a method of PreparedStatement I am missing?
 
thanks and regards
 
Paul.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]