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
Solved

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

Posted on 1998-11-10
11
167 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
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
Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

 
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 200 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

This tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you mig…
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…
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…

828 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