Hi Eric, Thanks for letting us know.
-Vincent > -----Original Message----- > From: Eric M Devlin [mailto:[EMAIL PROTECTED] > Sent: 24 March 2003 02:34 > To: Vincent Massol > Subject: RE: porting cactus to jboss-3.0.6_tomcat-4.1.18 > > Hey Vincent, > Everything compiled and worked fine with NO code changes using > commons-httpclient-2.0-alpha3.zip and jce-1_2_2.zip. Seems like an update > for 1.4.1 is just a recompile away. > Eric > > -----Original Message----- > From: Vincent Massol [mailto:[EMAIL PROTECTED] > Sent: Sunday, March 16, 2003 3:23 AM > To: 'Cactus Developers List' > Cc: [EMAIL PROTECTED] > Subject: RE: porting cactus to jboss-3.0.6_tomcat-4.1.18 > > > Hi Eric, > > Thanks very much for your post. However, I have some problems reading > your patch. Would it be possible to send it as an attached file so that > it doesn't get mangled by mail readers? > > There is another problem: your patch applies against Cactus 1.4.1 and > Cactus has evolved quite a lot since 1.4.1. For example the > HttpClientConnectionHelper class that you have modified is no longer > part of Cactus (it is part of HttpClient). > > In addition, it seems you were using a very old version of HttpClient > (1_0). You would need to use the latest 2.0alpha3 at least. > > We could of course release a bug release for against Cactus 1.4.1 but > I'd rather do it on HEAD as we're going to release Cactus 1.5 soon and > anyway, the nightly builds are working and anyone can easily grab one. > > Would it be possible for you to resend your patch against Cactus HEAD > (using new version of HttpClient)? > > Thanks a lot Eric! > -Vincent > > > -----Original Message----- > > From: Eric M Devlin [mailto:[EMAIL PROTECTED] > > Sent: 16 March 2003 06:26 > > To: [EMAIL PROTECTED] > > Subject: porting cactus to jboss-3.0.6_tomcat-4.1.18 > > > > Hey, > > I recently coverted to jboss-3.0.6_tomcat-4.1.18 and was having a > > problems > > running > > cactus. JBoss was complaing about Servlet api incompatibilties. So > > using > > the src > > code from jakarta-cactus-src-1.4.1.zip, installing > aspectj-tools-1.0.6 & > > aspectj-antTasks-1.0.6, using cvs to get module > > jakarta-commons/httpclient tag > > HTTPCLIENT_1_0, using cvs for module jakarta-commons/logging tag > > LOGGING_1_0_2, > > downloading httpunit-1.5.2, downloading junit3.8.1, and using > > $JBOSS_HOME/lib/jboss-j2ee.jar > $JBOSS_HOME/server/default/lib/log4j.jar > > $JBOSS_HOME/tomcat-4.1.x/common/lib/servlet.jar, I was able to get > it > > working. > > Here are the diffs to the four files I changed. Hope this helps > > somebody. > > Eric > > > > /java/jakarta/cactus/jakarta-cactus-src- > > 1.4.1/framework/src/java/share/org/a > > pache/cactus>diff ./client/AbstractConnectionHelper.java > > ./client/AbstractConnectionHelper.java.orig > > 157c157,158 > > < Vector httpClientCookies = new Vector(); > > --- > > > org.apache.commons.httpclient.Cookie[] httpclientCookies > = > > > new > > org.apache.commons.httpclient.Cookie[cookies.size()]; > > 178c179 > > < org.apache.commons.httpclient.Cookie > > httpClientC > > ookie = > > --- > > > httpclientCookies[i] = > > 183,184c184,185 > > < > httpClientCookie.setComment(cactusCookie.getComment()); > > < httpClientCookie.setExpiryDate( > > --- > > > > > httpclientCookies[i].setComment(cactusCookie.getComment()); > > > httpclientCookies[i].setExpiryDate( > > 186,188c187,188 > > < httpClientCookie.setPath(path); > > < httpClientCookie.setSecure(cactusCookie.isSecure()); > > < httpClientCookies.add( > httpClientCookie ); > > --- > > > httpclientCookies[i].setPath(path); > > > > httpclientCookies[i].setSecure(cactusCookie.isSecure()); > > 196c196 > > < httpClientCookies ); > > --- > > > httpclientCookies); > > > > /java/jakarta/cactus/jakarta-cactus-src- > > 1.4.1/framework/src/java/share/org/a > > pache/cactus>diff ./client/HttpClientConnectionHelper.java > > ./client/HttpClientConnectionHelper.java.orig > > 63a64 > > > import java.io.ByteArrayOutputStream; > > 140c141 > > < this.method.setHeader("Content-type", > > --- > > > this.method.setRequestHeader("Content-type", > > 149c150 > > < this.method.setHeader("Cookie", cookieString); > > --- > > > this.method.addRequestHeader("Cookie", cookieString); > > 210c211 > > < this.method.setHeader(key, fullHeaderValue.toString()); > > --- > > > this.method.addRequestHeader(key, > > fullHeaderValue.toString()); > > 229c230,239 > > < ((PostMethod) this.method).parseResponse( > > theRequest.getUserData > > () ); > > --- > > > InputStream stream = theRequest.getUserData(); > > > ByteArrayOutputStream baos = new ByteArrayOutputStream(); > > > > > > byte[] buffer = new byte[2048]; > > > int length; > > > while ((length = stream.read(buffer)) != -1) { > > > baos.write(buffer, 0, length); > > > } > > > > > > ((PostMethod) this.method).setRequestBody(baos.toString()); > > > > /java/jakarta/cactus/jakarta-cactus-src- > > 1.4.1/framework/src/java/share/org/a > > pache/cactus>diff ./util/HttpURLConnection.java > > ./util/HttpURLConnection.java.orig > > 62d61 > > < import org.apache.commons.httpclient.methods.GetMethod; > > 69d67 > > < import java.util.Enumeration; > > 129c127 > > < return ((GetMethod)this.method).getData(); > > --- > > > return this.method.getResponseBodyAsStream(); > > 194,209c192,199 > > < if ( theName != null ) { > > < Enumeration headers = > this.method.getHeaders(); > > < if ( headers != null ) { > > < while( headers.hasMoreElements() ) { > > < Header header = > > (Header)headers.nextElem > > ent(); > > < if ( header != null ) { > > < String name = > > header.getName(); > > < if ( name != null ) { > > < if > > (name.equalsIgnoreCas > > e(theName)) { > > < return > > header.ge > > tValue(); > > < } > > < } > > < } > > < } > > < } > > < } > > --- > > > // Note: Return the last matching header in the Header[] > array, > > as > > in > > > // the JDK implementation. > > > Header[] headers = this.method.getResponseHeaders(); > > > for (int i = headers.length - 1; i >= 0; i--) { > > > if (headers[i].getName().equalsIgnoreCase(theName)) { > > > return headers[i].getValue(); > > > } > > > } > > 230,243c220,223 > > < int counter = 0; > > < Enumeration headers = this.method.getHeaders(); > > < if ( headers != null ) { > > < while( headers.hasMoreElements() && ( counter > <= > > theKeyP > > osition ) ) { > > < Header header = > > (Header)headers.nextElement(); > > < if ( counter == theKeyPosition ) { > > < if ( header != null ) { > > < return > header.getName(); > > < } > > < break; > > < } > > < counter++; > > < } > > < } > > --- > > > Header[] headers = this.method.getResponseHeaders(); > > > if (theKeyPosition < 0 || theKeyPosition >= headers.length) > { > > > return null; > > > } > > 245c225 > > < return null; > > --- > > > return headers[theKeyPosition - 1].getName(); > > 258c238,239 > > < return "HTTP/1.1 " + this.method.getStatusCode() > > --- > > > if (((HttpMethodBase) this.method).isHttp11()) { > > > return "HTTP/1.1 " + this.method.getStatusCode() > > 259a241,244 > > > } else { > > > return "HTTP/1.0 " + this.method.getStatusCode() > > > + " " + this.method.getStatusText(); > > > } > > 265,278c250,253 > > < int counter = 0; > > < Enumeration headers = this.method.getHeaders(); > > < if ( headers != null ) { > > < while( headers.hasMoreElements() && ( counter > <= > > thePosi > > tion ) ) { > > < Header header = > > (Header)headers.nextElement(); > > < if ( counter == thePosition ) { > > < if ( header != null ) { > > < return > header.getValue(); > > < } > > < break; > > < } > > < counter++; > > < } > > < } > > --- > > > Header[] headers = this.method.getResponseHeaders(); > > > if (thePosition < 0 || thePosition >= headers.length) { > > > return null; > > > } > > 280c255 > > < return null; > > --- > > > return headers[thePosition - 1].getValue(); > > > > /java/jakarta/cactus/jakarta-cactus-src- > > 1.4.1/framework/src/java/share/org/a > > pache/cactus>diff WebResponse.java WebResponse.java.orig > > 253,256c253,256 > > < // Cookie.getCookiePort(getWebRequest(), > > < // getConnection().getURL().getPort()), > > < // Cookie.getCookiePath(getWebRequest(), > > < // getConnection().getURL().getFile()), > > --- > > > Cookie.getCookiePort(getWebRequest(), > > > getConnection().getURL().getPort()), > > > Cookie.getCookiePath(getWebRequest(), > > > getConnection().getURL().getFile()), > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
