?
Solved

CGI  ERROR !!!!!!!!!!!!!!!!!1

Posted on 1998-11-10
11
Medium Priority
?
172 Views
Last Modified: 2013-12-25
I CAN'T POST VIA MY HTML I GET THIS ERROR MESSAGE
"The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:"

I USE THIS HTML :

<form ACTION="VV.exe" METHOD="GET">
  <p><u><strong><big>Total</big></strong></u> <input TYPE="TEXT" NAME="total" SIZE="2"> <br>
  </p>
  <p><input TYPE="submit" VALUE="Submit"></p>
</form>

I USE NT SERVER 4
AND IIS SERVER

THANK YOU FOR TRYING TO HELP ME !!



0
Comment
Question by:neta
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
11 Comments
 
LVL 10

Expert Comment

by:rbr
ID: 1829501
The error is in the VV.exe. Can you pls post this code.
0
 

Author Comment

by:neta
ID: 1829502
Edited text of question
0
 

Author Comment

by:neta
ID: 1829503
i write application writen in j++ 6 and  make an
exe file (vv.exe) from the application.
now the cgi i have made give me the error.
Is it becuse the parameter i write from the java application
cant be display as a cgi?.
if i try to pas the parameters vv.exe?2121 i get the error
but i get it in the cgi and print them out to the browser.
the code which pritnt it out is
System.out.println(args[0]);



0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 10

Expert Comment

by:MasseyM
ID: 1829504
Just a question:

If you use IIS 4 why don't you use ASP?  It is much easier to do server interaction with the web.
0
 
LVL 8

Expert Comment

by:MaDdUCK
ID: 1829505
please give us the code of the java applet/program...You are not outputting correct headers. Once I see code I can help you with it.
0
 
LVL 7

Expert Comment

by:faster
ID: 1829506
You need to have "Content-type: text/html\r\n\r\n" at the start of your output.  The important thing is two end-of-line, "\n\n" also works.
0
 

Author Comment

by:neta
ID: 1829507
Verey good FASTER this fix the problem
But I have a biger Problem
i GET FROM THE JAVA cgi

Error :

java.lang.ArrayIndexOutOfBoundsException


MY PSADO "COD":
public static void main (String[] args){
        
YourClass b = new YourClass(args[0]); //THIS PASS THE PARAMETER
        
        START TREAD B

          WAIT FOR 5400 SEC THEN STOP.

}



public class YourClass implements Runnable
         {
    String name ;
 
  public YourClass(String v){
             

              name = v;  
              }
             
             
             
public void run(){

System.out.println("Content-type: text/html\n");
System.out.println("<pre>");
System.out.println(name);

System.out.println("</HTML>");
System.out.println("</pre>");
System.out.println("</body>");
System.out.println("</html>");
                              
                              
   }
         
}
 
                         
0
 
LVL 8

Expert Comment

by:MaDdUCK
ID: 1829508
as said, the line that contains
System.out.println("Content-type: text/html\n");

should be changed to
System.out.println("Content-type: text/html\r\n\r\n");
or if that does not work to
System.out.println("Content-type: text/html\n\n");

Then, I would suggest that you output the <html><head></head><body> headers around your html code to make it comply with HTML rules.

any questions?



0
 

Author Comment

by:neta
ID: 1829509
good answer but i need more
pleas try to help me getting the parameters
mybe you know how what are the java's method that
get the environment parameters from the html
and i dont want to use servelet.

0
 
LVL 8

Accepted Solution

by:
MaDdUCK earned 600 total points
ID: 1829510
your question was not really asking for this...anyway. I do not know how the java call for environment variables is, but I assume it is getEnv or something similar. You get the parameters from the environment variable QUERY_STRING and these will be in the form para1=val1&para2=val2&test&para3=val3, so you need to parse it to extract the information.

If you intend to do this, then I suggest you obtain a CGI library written in C++ or Java (www.cgi-resources.com is your place to start).

later,
MaDdUCK
0
 
LVL 8

Expert Comment

by:MaDdUCK
ID: 1829511
still there?
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you get a (Blue Screen of Death), your system writes a small file called a minidump. Your first step is to make certain your computer is setup to record memory dumps. Right click My Computer, choose properties. Click on the advanced tab, an…
Making a simple AJAX shopping cart Couple years ago I made my first shopping cart, I used iframe and JavaScript, it was very good at that time, there were no sessions or AJAX, I used cookies on clients machine. Today we have more advanced techno…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question