?
Solved

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

Posted on 1998-11-10
11
Medium Priority
?
171 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
Major Serverless Shift

Comparison of major players like AWS, Microsoft Azure, IBM Bluemix, and Google Cloud Platform

 
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

Interactive Way of Training for the AWS CSA Exam

An interactive way of learning that will help you visualize core concepts so that you can be more effective when taking your AWS certification exam.  Built for students by a student to help them understand the concepts that they are being taught.

Question has a verified solution.

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

In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

752 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