hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthias Stoll <Matthias.St...@hpigmbh.com>
Subject Re: Error while trying to do http post
Date Wed, 02 Mar 2005 09:59:42 GMT
Hello Roland

Thx for the tip, but configuration seems ok, since it is working when 
using a different url (e.g. www.google.de). i'm only getting this error 
when using the below url:

http://wli-de.eurotax.com/wli/dede/entry/welcome.php

the url sent to the browser results in :

http://www.mydomain.com/wli/dede/entry/welcome.php

it just leaves out the wli-de thing.


greetings
__
Matthias Stoll
hpi GmbH
Application Development
Am Limes Park 2
D - 65843 Sulzbach/Ts.
Web site: http://www.hpigmbh.com



Roland Weber <ROLWEBER@de.ibm.com> 
02.03.2005 10:52
Please respond to
"HttpClient User Discussion" <httpclient-user@jakarta.apache.org>


To
"HttpClient User Discussion" <httpclient-user@jakarta.apache.org>
cc

Subject
Re: Error while trying to do http post






Hello Matthias,

this is a server side error message from WAS.
Make sure that the web server plugin configuration
is current. If in doubt, regenerate it.

hope that helps,
  Roland




Matthias Stoll <Matthias.Stoll@hpigmbh.com> 
02.03.2005 09:47
Please respond to
"HttpClient User Discussion"


To
httpclient-user@jakarta.apache.org
cc

Subject
Error while trying to do http post






Hi

We are using Websphere 5.1 and developing on WSAD 5.1.2.

We are trying to do a http post with the httpclient to a partner side. 
when executing the connection the server says: 

Servlet Request Processor Exception: Virtual Host/WebGroup Not Found : The 


web group /wli/dede/entry/welcome.php has not been defined


see code below:

public void doGet(HttpServletRequest request, HttpServletResponse 
response) throws ServletException, IOException {

                try {
                        System.setProperty(
"org.apache.commons.logging.Log", 
"org.apache.commons.logging.impl.SimpleLog");
                        System.setProperty(
"org.apache.commons.logging.simplelog.showdatetime", "true");
                        System.setProperty(
"org.apache.commons.logging.simplelog.log.httpclient.wire", "debug");
                        System.setProperty(
"org.apache.commons.logging.simplelog.log.org.apache.commons.httpclient", 
"debug");

                        PostMethod post = new PostMethod(
"http://wli-de.eurotax.com/wli/dede/entry/welcome.php");
                        NameValuePair[] data = { new NameValuePair("1", 
"a"), new NameValuePair("2", "b"), new NameValuePair("3", "c")};
                        post.setRequestBody(data);
                        HttpClient l_client = new HttpClient();
                        l_client.executeMethod(post);
 
                        InputStream l_input = 
post.getResponseBodyAsStream();

                        int l_readByte = l_input.read();

                        while (l_readByte != -1) {
                                response.getWriter().write(l_readByte);
                                l_readByte = l_input.read();
                        }
                        post.releaseConnection();
 
                }
                catch (Exception e) {
                        e.printStackTrace();
                }
        }


Does anyone have a idea of what we are doing wrong? for example if we use 
www.web.de as url, it works fine.
__
Matthias Stoll
hpi GmbH
Application Development
Am Limes Park 2
D - 65843 Sulzbach/Ts.
Web site: http://www.hpigmbh.com


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message