The Adapter implementation is expecting that the requestURI is of type BYTE. It doesn't deal well with type STRING.
----- Original Message ----- From: "Henrique Faria" <[EMAIL PROTECTED]> To: "'Tomcat Developers List'" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, August 02, 2004 1:30 PM Subject: Getting only Response 400 when implementing a new connector for Tomcat 5 I´ve been trying to write a Dummy Conector to Tomcat just to learn how I must call an Adapter. It´s the first step to write a ISO-8583 connector. For that, I instancialize an Request and Response (org.apache.coyote), and set all attributes that I think to be necessary : request = new Request(); response = new Response(); ByteChunk inputChunk = new ByteChunk(); InputBuffer inputBuffer = new ByteChunkInputBuffer(new ByteChunk()); OutputBuffer outputBuffer = new ByteChunkOutputBuffer(new ByteChunk()); request.setInputBuffer(inputBuffer); response.setOutputBuffer(outputBuffer); // construct a fake request request.setResponse(response); request.setInputBuffer(inputBuffer); request.protocol().setString("HTTP/1.1"); request.query().setString(""); request.method().setString("GET"); request.scheme().setString("http"); request.serverName().setString("jlima-dsk1"); request.requestURI().setString("/WebModule/servlet1"); request.unparsedURI().setString("/WebModule/servlet1"); request.queryString().setString(""); request.setStartTime(System.currentTimeMillis()); After that, I try to invoke the container via an Adapter ( org.apache.coyote ), and finally I print the response. adapter.service(request,response); But what I got from the response is quit strange. I always get an 400 error, even when the host exist. org.apache.coyote.Response.getMessage() = No Host matches server name jlima-dsk1 org.apache.coyote.Response.getStatus() = 400 Do anybody know what I´m doing wrong ? PS: I´m using J2SDK 1.4.2 and Tomcat 5. Henrique Faria Senior Consultant Java Software Team tel: 55.11.3285 4699 cel: 55.11.9811 8281 fax: 55.11.3266 5121 [EMAIL PROTECTED] Júlio Melhado Lima Senior Consultant Java Software Team tel: 55.11.3285 4699 cel: 55.11.9811 8281 fax: 55.11.3266 5121 [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
This message is intended only for the use of the person(s) listed above as the intended recipient(s), and may contain information that is PRIVILEGED and CONFIDENTIAL. If you are not an intended recipient, you may not read, copy, or distribute this message or any attachment. If you received this communication in error, please notify us immediately by e-mail and then delete all copies of this message and any attachments. In addition you should be aware that ordinary (unencrypted) e-mail sent through the Internet is not secure. Do not send confidential or sensitive information, such as social security numbers, account numbers, personal identification numbers and passwords, to us via ordinary (unencrypted) e-mail.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]