I have also tried this without any success:

                    final GetMethod getMethod = new GetMethod("/ind");
                    final NameValuePair[] anvp = {new 
NameValuePair(WSCConstants.PARAM_xxx, x)};
                    getMethod.setQueryString(anvp);

                    int statusCode =
httpClient.executeMethod(getMethod);
                    if (statusCode == HttpStatus.SC_OK) {
                        putNumber =
Integer.parseInt(getMethod.getResponseBodyAsString());
                    }

                    getMethod.releaseConnection();

                // This second get never call the Tomcat Servlet  ??????
                    final GetMethod getMethod2 = new 
GetMethod("/getputdataservlet");
                    final NameValuePair[] anvp2 = {new 
NameValuePair(WSCConstants.PARAM_xxx, x)};                                      
           getMethod2.setQueryString(anvp2);


                     statusCode = httpClient.executeMethod(getMethod2);
                     if (statusCode == HttpStatus.SC_OK) {
                     }
                          getMethod2.releaseConnection();
Regards.
 

-----Message d'origine-----
De : COURTAULT Francois [mailto:[EMAIL PROTECTED] 
Envoyé : lundi 9 janvier 2006 15:37
À : [email protected]; [email protected]
Objet : What's wrong with this code
Importance : Haute

Hello,

The second call to the getMethod fails. Do you know why ?

                    GetMethod getMethod = new GetMethod("/ind");
                    final NameValuePair[] anvp = {new 
NameValuePair(WSCConstants.PARAM_xxx, x)};
                    getMethod.setQueryString(anvp);

                    int statusCode =
httpClient.executeMethod(getMethod);
                    if (statusCode == HttpStatus.SC_OK) {
                        putNumber =
Integer.parseInt(getMethod.getResponseBodyAsString());
                    }

                    getMethod.releaseConnection();

                // This second get never call the Tomcat Servlet  ??????
                    getMethod = new GetMethod("/getputdataservlet");
                    getMethod.setQueryString(anvp);


                     statusCode = httpClient.executeMethod(getMethod);
                     if (statusCode == HttpStatus.SC_OK) {
                     }
                 getMethod.releaseConnection();

Regards.

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

Reply via email to