You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Thilina <th...@beyondm.net> on 2004/11/18 07:19:45 UTC

Software error - while accessing a cgi page

hi,

I'm using Commons http-client to access and get the source of the cgi
page.

==========================================
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.UsernamePasswordCredentials;
import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.httpclient.methods.PostMethod;

import java.io.IOException;

public class WebPageGetter {
    public String getContent(String URL) throws IOException {

//URL = http://bugs.beyondm.net/createaccount.cgi

       HttpClient client = new HttpClient();
        
        PostMethod get = new PostMethod(URL);
        get.setDoAuthentication( true );
        int status = client.executeMethod( get );
        String response = get.getResponseBodyAsString();
        get.releaseConnection();
        return response;
    }
}

==========================================

I got the following message while accessing a cgi page
(createaccount.cgi).

Software error:
Couldn't get form data at CGI.pl line 1375.

For help, please send mail to the webmaster (root@localhost), giving
this error message and the time and date of the error.


Software error:
[Thu Nov 18 10:58:59 2004] createaccount.cgi: Couldn't get form data at
CGI.pl line 1375.
Compilation failed in require at /usr/local/bugzilla/createaccount.cgi
line 28.

For help, please send mail to the webmaster (root@localhost), giving
this error message and the time and date of the error.



Why this kind of message arrives and can you please send me a way to
solve it?

Thank you.
Thilina


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: Software error - while accessing a cgi page

Posted by Oleg Kalnichevski <ol...@apache.org>.
Thilina,

Apparently the expected POST parameters are missing. Please examine the
HTML form to find out what parameters are expected by the script.

Hope this helps

Oleg


On Thu, Nov 18, 2004 at 12:19:45PM +0600, Thilina wrote:
> hi,
> 
> I'm using Commons http-client to access and get the source of the cgi
> page.
> 
> ==========================================
> import org.apache.commons.httpclient.HttpClient;
> import org.apache.commons.httpclient.UsernamePasswordCredentials;
> import org.apache.commons.httpclient.methods.GetMethod;
> import org.apache.commons.httpclient.methods.PostMethod;
> 
> import java.io.IOException;
> 
> public class WebPageGetter {
>     public String getContent(String URL) throws IOException {
> 
> //URL = http://bugs.beyondm.net/createaccount.cgi
> 
>        HttpClient client = new HttpClient();
>         
>         PostMethod get = new PostMethod(URL);
>         get.setDoAuthentication( true );
>         int status = client.executeMethod( get );
>         String response = get.getResponseBodyAsString();
>         get.releaseConnection();
>         return response;
>     }
> }
> 
> ==========================================
> 
> I got the following message while accessing a cgi page
> (createaccount.cgi).
> 
> Software error:
> Couldn't get form data at CGI.pl line 1375.
> 
> For help, please send mail to the webmaster (root@localhost), giving
> this error message and the time and date of the error.
> 
> 
> Software error:
> [Thu Nov 18 10:58:59 2004] createaccount.cgi: Couldn't get form data at
> CGI.pl line 1375.
> Compilation failed in require at /usr/local/bugzilla/createaccount.cgi
> line 28.
> 
> For help, please send mail to the webmaster (root@localhost), giving
> this error message and the time and date of the error.
> 
> 
> 
> Why this kind of message arrives and can you please send me a way to
> solve it?
> 
> Thank you.
> Thilina
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org