Quick followup for the archives, the compiler was still saying "int
cannot be dereferenced", but this got me on the right track, and
Integer.toString(result) did the trick.
--
jon
mailto:[EMAIL PROTECTED]
Tuesday, October 14, 2003, 11:35:56 AM, you wrote:
CD> setVariable will ony return strings, just turn the int into a string.
CD> Try,
CD> response.setVariable("fedex.statusCode", result.toString() );
CD> or
CD> String strResult = result.toString();
CD> response.setVariable("fedex.statusCode", strResult );
CD> -----Original Message-----
CD> From: jon hall [mailto:[EMAIL PROTECTED]
CD> Sent: 14 October 2003 16:35
CD> To: CF-Talk
CD> Subject: java cfx tag - returning integer variable
CD> I'm having trouble setting an integer response variable in my cfx tag.
CD> Here is the compiler error:
CD> fedex.java:125: setVariable(java.lang.String,java.lang.String) in
CD> com.allaire.cfx.Response
CD> cannot be applied to (java.lang.String,int)
CD> response.setVariable("fedex.statusCode", result);
CD> Here is the applicable code. If I change result to any string value it
CD> compiles fine. I've even tried casting result to a string...no luck.
CD> int result = httpclient.executeMethod(post);
CD> response.setVariable("fedex.statusCode", result);
CD> response.setVariable("fedex.response", post.getResponseBodyAsString());
CD> Is it possible to return an integer value to CF?
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
- java cfx tag - returning integer variable jon hall
- RE: java cfx tag - returning integer variable Craig Dudley
- jon hall