.cgi script example

I wish to submit data to web. I think cgi script needs for this purpose.
How can I get example of cgi script?

Hi,
thanks for ur reply...to b clear,i have written a perl program for TGDH algorithm..i.e.,whenever a new user joins the dynamic group,a node 'll b created for that user in a tree structure..user entry applet is written in java..only the tree formation program i have written in perl..i need to send the user entry details to be sent to the perl program and the result to b returned to the applet..can any one tell me the format with a simple eg r kindly tell me any reference where i could know abt tat...

Similar Messages

  • I am using CGI Vis examples in LV6.1, and the VI simply opens when I click on a link. What am I doing wrong?

    I am running Labview 6.1 and am simply trying to learn about the CGI VIs from the examples. I set up the Web Server root directory and I have the cgi-bin directory in it. When I view the provided index.htm file using http://localhost/index.htm, I see the web server document (so the server is working???). I go to the CGI examples and click on the link for CGI Basics. Everytime I click on the link, the vi tries to download with a prompt for SAVE or OPEN. If OPEN is selected the vi opens but does not run. I thought it might be a problem with the browser being on the same machine, so I went to a machine without Labview installed and it still tries to download th
    e vi locally from the server. I assumed from the documentation that the vi runs on the server and sends a request back in html form. I must have missing something or setup wrong. Any help would be deeply appreciated!
    Setup (In case it matters)
    Labview 6.1
    Internet Developers Toolset 5.0
    Windows XP Pro and Windows 2000 Pro (Tried both)
    Internet Explorer 6.0
    Happy New Year to all!!!

    I am not sure what the problem could be and I am a little confused about the exact steps you took. I launch LabVIEW, start the HTTP server, point my web browser to http://localhost/index.htm. This brings of a page entitled G Web server. I click on the button to "View CGI Examples" which redirects by browser to http://localhost/examples/index.htm . I click on CGI Basics and go to http://localhost/examples/basics.htm .
    This page has four groups of examples and within each group there are several examples. All of the examples I clicked on redirected my browser. Is this what you see?
    Was the message to save or open from the browser or from LabVIEW? If it was from LabVIEW, then you might consider mass compiling the VIs on your computer. You can do this
    by opening LabVIEW >> tools >> advanced >> mass compile.
    You might also try a reinstall of the Internet Toolkit. The examples may have been corrupted.
    Finally, LabVIEW 6.1 introduced remote front panels. You might find them easier to use than CGI scripting.

  • This.submitForm() -- problem with my cgi script

    Thanks to George Johnson for an earlier answer to a related issue with this.submitForm.
    I am trying to use this.submitForm as per Example 1 on p. 348 of "JavaScript for Acrobat API Reference" document.
    To avoid any restrictions with my web hosting service, I am using the following JavaScript (on my form's Submit button) on my local XAMPP server:
    this.submitForm ("./cgi-bin/myscript.cgi");
    My question involves what should be in the myscript.cgi file before I submit to it.  If there is no file to start with, the
    submission will result in a "File not found" error.  So I guess I need the myscript.cgi file in the cgi-bin folder to begin with.
    When I put in a blank myscript.cgi file in that folder (hoping the submission will overwrite it), I can the following message:
    Server error!  The server encountered an internal error and was unable to complete your request. Either the server is overloaded or
    there was an error in a CGI script.
    Can you tell me what is happening?  What should my original myscript.cgi have in it, if anything?

    Thanks for responding.
    I want CGI script to processes the incoming data from the PDF form submission. I want that process to save the FDF to a file on the server. 
    I also understand that the script has to return a response to the client.  I would like to send some kind of confirmation to the client.
    I realize that writing scripts isn't rocket science, but it would seem that Adobe would have some examples of scripts that deal specifically with fdf data.  Could you point me to any examples?

  • Are servlets like cgi scripts?

    hi all,
    are servlets like cgi scripts?
    or
    they should be embedded within the html file,
    thank you very much
    :)

    Yes, Servlets are very similar to CGI scripts -- they both run on the server and grab input from the HTTP GET or POST request, then send generated HTML back to the client browser.
    Often Servlets are described as being superior to CGI scripts because each time a CGI script is run a new process must be created. However, you can run Perl CGI scripts without starting a new process (using mod_perl, for example), and therefore that claim is unfounded.

  • Invoke CGI script in JSP?

    Hello All:
    I tried to use:
    <jsp:include flush="true" page="/cgi/test.cgi">to invoke CGI script. The problem is the parameters in request were not passed to CGI. There is no this issue if page invoked is JSP.
    I am using SunONE Web Server 6.1
    I appreciate you for any consideration.

    Well, you can only do that when the new page is complete - probably in the onload event. Which means you have to tell it which field you want to focus - probably by submitting an extra parameter.
    Heres a working example:
    <html>
    <head>
    <script language="javascript">
      function saveCurrentField(field){
        document.forms[0].currentField.value = field.name;
      function focusLastField(){
        var lastField = "${param.currentField}";
        document.forms[0][lastField].focus();
    </script>
    </head>
    <body onload="focusLastField()">
    <h1>Testing jsp to focus a field on load of the page</h1>
    <form>
    <table>
    <tr><td>Name:</td><td><input type="text" name="name" value="${param.name}" onchange="saveCurrentField(this); this.form.submit();"></td></tr>
    <tr><td>email:</td><td> <input type="text" name="email" value="${param.email}" onchange="saveCurrentField(this); this.form.submit();"></td></tr>
    <tr><td>Age:</td><td>
      <select name="age" onchange="saveCurrentField(this); this.form.submit();">
        <option>  0-20
        <option> 21-40
        <option> 41-60
        <option> 60+
      </select>
    </td></tr>
    </table>
    <input type="hidden" name="currentField">
    </form>
    </body>
    </html>I wrote it using EL expressions.
    If you don't have a JSP2.0 container, or EL is not enabled, replace those ${param.xxxxxx} expressions with <%= request.getParameter"xxxxxxx") %>
    Cheers,
    evnafets

  • Formmail action & cgi scripts

    I have 2 forms I built in CS3 that have to be processed in a
    secure manner. I followed the advice I found online and from my
    webhost (network solutions) and downloaded Visual Form Mail Pro. I
    uploaded the cgi script files to the cgi-bin on the server and
    setup the permissions. When I click the submit button on the form,
    I get an Internal Server Error message. I think the problem is the
    action field on the properties panel. I cannot find anything that
    will tell me what the action should be. I cannot use the mailto
    action, the forms are for secure medical information to be
    forwarded to a dr's office. One other issue with how the form needs
    to be processed to email, is my client wants the email sent to his
    gmail account, how do I configure that?
    the url for the form I tried to configure is
    https://www.stluciegi.com/contact/patientcontact.html

    ou can use PHP on this hosting?
    I'd suggest using the phpformmail script.
    here's my stock cut 'n paste on what to set to what, and why
    1)go to
    http://http://developerkarma.com/projects
    -->phpformmail
    download it.
    extract the ZIP file.
    More detailed instructions are in the docs folder. These
    shortcut
    instructions are for version 1.07 of the phpformmail script.
    2) open formmail.php in dreamweaver
    Make the following changes (in code view, turn line numbers
    on)
    2a)
    line 4,
    define('CHECK_REFERER', true);
    change to:
    define('CHECK_REFERER', false);
    reason: too many people use a firewall or Norton security to
    restrict this.
    2b)
    Line 43
    $referers = array('www.example.com', 'example.com');
    change to the domain name of your web site.
    reason: this probably isn't needed since we just turned the
    referrer
    checking off. but change it anyway.
    2c)  *this is to hard-code the recipient address into
    the php
    file, where it is totally invisible *
    Line 46
    $recipient_array = array();
    change to:
    $recipient_array = array('me' =>
    '[email protected]');
    **of course, replace [email protected]  with
    the email address
    you want to receive the form data. Also note the single quote
    marks.
    reason: this sets the email address the form results will be
    sent to.
    You can also make a list of possible recipient alias values-
    see the readme
    in the docs folder.
    2d) give the script a default "From" address to use.
    Go to line 41
    Change:
    define('FROM', null);
    to:
    define('FROM', 'Example Name <[email protected]>');
    substituting your name and email address.
    3) now do a File-->Save As and save this file to within
    this Local Site
    folder. save it as anythingyouwant.php
    4) in dw's File Panel, find anythingyouwant.php and upload it
    to the remote
    site.
    5) Now open your form html file in dreamweaver,
    5a)click the mouse into the form area, and select the
    <form> tag on the
    lower left margin of the design window.
    In the Property Inspector, it should now show the properties
    of the <form>
    tag. In the Property Inspector, to the right of the ACTION
    line, click the
    folder icon and browse to and select the anythingyouwant.php
    file
    you've saved to within this site.
    5b) now click within the form area and go to dw
    menu-->Insert-->Form
    Objects-->Hidden Field
    This inserts a hidden form field.
    In the property inspector, change the NAME/ID of this field
    to: recipient
    And the VALUE of this field to: me
    the code should look like:
    <input name="recipient" type="hidden" id="recipient"
    value="me">
    This tells the script to use the "me" recipient_alias value
    as the email
    address to send the form to.
    5c: Do you have a form field to collect the user's email
    address?
    If yes, if this field is named exactly "email" then the
    script will use the
    user's email as the reply to in the outgoing email
    6) Save and upload the form page.
    Try the form from the website.
    Optional:
    1-make a new page for a thank you for submitting message.
    In the form, insert another hidden field.
    Name: redirect
    Value:  the full absolute
    http:// address to the new thank you page.
    If you don't set a redirect value- the form script will build
    a "thank you,
    here is what you submitted" page. If you want to use that
    dynamic page-
    upload the .css file that it uses.
    2- If you have a field in the form to collect the visitor's
    email address,
    IF you name this field  in the form exactly  
     email   then the visitor's
    email address will be the Reply To address in the outgoing
    email.
    There are 30 or so other optional form fields to control the
    form- see the
    readme in the docs folder. One of those optional control
    fields is
    verification.
    Alan
    Adobe Community Expert, dreamweaver
    http://www.adobe.com/communities/experts/

  • CGI scripts written in Applescript

    A few questions:
    1. Can I write CGI scripts in Applescript?
    2. If yes ... how?
    3. How can I test this on my mac?
    Thank you in advance for your help and insight

    >1. Can I write CGI scripts in Applescript?
    Not directly. Apache can't send AppleEvents, so you need an intermediary.
    ACGI Dispatcher was the original solution. I don't know if it still works.
    >2. If yes ... how?
    The above software includes several example scripts.
    >3. How can I test this on my mac?
    In the same way you would on your production server - install it and hit it with your web browser...

  • Calling a cgi script URL in a jsp

              I have a requirement of calling a cgi script URL from a jsp.
              I wish to do the following:
              1. take the parameters from the jsp page,
              2. populate the parameters in the cgi script url,
              3. get results in a java structure
              4. and then paint the gui based on the results.
              Can anyone help me on whether calling a cgi script as above is doable in java?
              An early response would be highly appreciated.
              thanks in advance
              Prashant Gupta
              

    Prashant,
              Yes you should be able to do what you ask (using a JSP to drive a CGI
              script/program) if I understand you correctly. You would gather all the
              parameters in the JSP code and present them to the CGI script/program
              using a FORM with method="POST".
              There is a good example of this in the WebLogic examples. Look for it
              somewhere like:
              C:\bea\wlserver6.1\samples\examples\jsp\tagext\form_validation
              in your installation. However, replace action="successPage.jsp" with
              your CGI script.
              Prashant wrote:
              > I have a requirement of calling a cgi script URL from a jsp.
              > I wish to do the following:
              > 1. take the parameters from the jsp page,
              > 2. populate the parameters in the cgi script url,
              > 3. get results in a java structure
              > 4. and then paint the gui based on the results.
              >
              > Can anyone help me on whether calling a cgi script as above is doable in java?
              > An early response would be highly appreciated.
              > thanks in advance
              > Prashant Gupta
              

  • How can i call a CGI script from java?

    The subject pretty much says it all. I want to call a perl cgi script so i can read from/write to files on a server. I don't know how to sign applets and this would be the easiest way for me, if someone could please tell me.

    Let me get this clear. Basically what u want to do is to just call a URL, right?
    U can do it by using the following code:
    import java.applet.*;
    import java.net.*;
    import java.io.*;
    public class testhttp
    public static void main(String[] args)
    try
    URL url = new URL ("http://../testcgi.cfm");
    HttpURLConnection cxn =
    (HttpURLConnection)url.openConnection();
    cxn.setRequestMethod("POST");
    cxn.setUseCaches(false);
    cxn.setDoOutput(true);
    cxn.setDoInput(true);
    ByteArrayOutputStream bytes = new
    ByteArrayOutputStream(400);
    PrintWriter writer = new PrintWriter (bytes,true);
    writer.print("application=map&release=1&items=prog1");
    writer.flush();
    cxn.setRequestProperty("Content-
    Length",String.valueOf(bytes.size()));
    cxn.setRequestProperty("Content-
    Type","application/x-www-form-urlencoded");
    bytes.writeTo(cxn.getOutputStream());
    System.out.println(bytes);
    String currentLine;
    BufferedReader in = new BufferedReader (new
    InputStreamReader(cxn.getInputStream(),"8859_1"));
    while((currentLine = in.readLine()) != null) {
    System.out.println(currentLine); }
    catch(Exception e) { e.printStackTrace(); }
    There is also a library called HTTP client which can be found at:
    http://www.innovation.ch/java/HTTPClient/index.html
    It's very simple to use and the documentation is all there, but their web server seems to be down right now.
    Anyway, hope my post helps.

  • How do I control data transfer rate from Java applications to CGI scripts?

    Hi. I've written a test cgi script which echoes any data it's sent back to the client, and I'm trying to write a java application that reads data from files on my hard drive and sends it to the cgi application.
    The method I've used is the same as the one described in the tutorial on this site, ie. create an URL object, open an URLConnection, get output stream from URLConnection, write data to output stream.
    The problem however is that the java application writes to the output stream at a much faster rate than my internet connection can handle, and so when I try to send more than a few kb the data doesn't seem to get sent at all. Is there some way I can control the rate at which data is sent, or is there a better way of sending data to a cgi application?
    I'd really appreciate any help, thanks!
    Ose.

    I've done some experimenting, and it seems that the problem is with my CGI application and not the Java application after all! (sigh) I wish I hadn't spent those duke dollars now. Oh well.

  • How to include html generated by a cgi-script ?

    Here's the problem:
    I need to include an html-header dynamically generated by a cgi-script: "web_nav.cgi" into my jsp-page.
    According to some documentation the <jsp:include page=... tag can only be used to include servlet, jsp or html files, and according to other sources it doesn't matter what technology the target uses, as long as it delivers html....
    I get a "..include failed, only jsp or html files can be included" error messsage so maybe the first theory is correct.
    But the problem remains: If not with the <jsp:include tag , How do I do it??
    Fast help would be really appreciated.
    Thnx a bunch.
    /Henrik

    Hi Henrik,
    1. the <jsp:include page="local_url" flush="true"/>
    works for local url which is context-relative only
    (within the same server and same context -application-)
    2. So where is your web_nav.cgi ? is it local or remote
    (on another server)
    3. You can do it, look into the jsp book or documentation
    for either jsp:include action and jsp:include directive for your need.
    --Paul

  • Apache - CGI script can't read query string from STDIN

    My Perl CGI script begins as follows:
    if ($ENV{'REQUEST_METHOD'} eq "POST") {
    read(STDIN,$in,$ENV{'CONTENT_LENGTH'});
    I dumped all ENV variables at entry, and verified that REQUEST_METHOD = "POST" and CONTENT_LENGTH = 73 (which is correct). QUERY_STRING is null. After the above read statement, $in is still null. Any idea why STDIN is not providing the query string?
    Thanks!
    Chap
    867MHz Powerbook   Mac OS X (10.4.8)  

    Hi--
    This isn't really an answer to the question you asked, but is there a reason you aren't using the Perl CGI module? It's installed by default on OS X and makes this kind of stuff much, much easier. Just add a line like this at the top of your script:
    <pre class="command">use CGI qw(:standard);</pre>Then you can get the paramaters for your script like so:
    <pre class="command">my $value = param('paramname');</pre>No muss, no fuss. You can get more information at the CPAN archive page for this module.
    charlie

  • Cannot execute CGI script in WL5.1 on Windows

    Hi
    when i execute a cgi script on WL5.1 on Windows NT machine, i get the
    following error :
    <ServletContext-General> cgi-bin: Failed to exec CGI script:myscript.pl
    The URL i use to call this cgi script is :
    http://localhost:7001/cgi-bin/myscript.pl
    I have added the following lines to weblogic.cmd file to allow for cgi
    support :
    weblogic.httpd.register.cgi-bin=weblogic.servlet.CGIServlet
    weblogic.httpd.initArgs.cgi-bin=\
    cgiDir=d:/weblogic/myserver/cgi-bin,\
    *.pl=D:\ActivePerl\Perl\bin\perl5.6.1.exe
    Can anyone help me with this ?
    Thanks

    Just a thought, did you try using forward slashes in the *.pl line?
    JSB wrote:
    Hi
    when i execute a cgi script on WL5.1 on Windows NT machine, i get the
    following error :
    <ServletContext-General> cgi-bin: Failed to exec CGI script:myscript.pl
    The URL i use to call this cgi script is :
    http://localhost:7001/cgi-bin/myscript.pl
    I have added the following lines to weblogic.cmd file to allow for cgi
    support :
    weblogic.httpd.register.cgi-bin=weblogic.servlet.CGIServlet
    weblogic.httpd.initArgs.cgi-bin=\
    cgiDir=d:/weblogic/myserver/cgi-bin,\
    *.pl=D:\ActivePerl\Perl\bin\perl5.6.1.exe
    Can anyone help me with this ?
    Thanks

  • Http post with cgi script

    Hello everyone,
    I currently have a pl/sql web form that executes a cgi script... Instead of that cgi containing any html and printing a page, I would like to just grab the output and print it as text, wrapping it in my pl/sql headers and footers and the like...
    I want to use util_http post to grab the cgi output, but am a little unsure how to do this - any tips??
    Many thanks

    See this link for help:
    http://download-west.oracle.com/docs/cd/A91202_01/901_doc/appdev.901/a89852/utl_htt4.htm#1003115

  • HTTP Post CGI script

    I don't want to write a server, I'd just like to have the MIDlet call a CGI script to transmit some formatted UDP data to a chat server.
    So basically the packet will send a command to the chat server, and the chat server will return with a single string.
    When the script prints out the response, can I capture that response in a String within the MIDlet? Or will it attempt to show it like a browser?

    You can capture the String from the Connection's InputStream.

Maybe you are looking for

  • Movement type 311 E in WM

    Hi gurus, I am working on product support @clients place where we have MTO items. Now the scenario is that a material XYZ was Goods Receipted in a wrong storage location (0001) by the Production Order confirmation. This was due to the way it was setu

  • Last update condition...

    Hi All I need to select the records who's last update date less than ( sysdate-90/1440) {Query} SQL> select present.object_type, present.object_id 2 from (select cb2.object_type, cb2.object_id, incident_status_name, 3 incident_severity_name 4 from cs

  • HT201210 Software Update Unavailable... HELP?! (iOS 7)

    After waiting what seemed like forever downloading the software, now it won't install. I have tried it on my universities super slow WiFi and On AT&T LTE.. It just keeps saying it over and over, is there anything else I can do? (hey look, right as I

  • UNCAUGHT_EXCEPTION - CX_RSD_NAME_ERROR

    Dear All, I am facing an issue while installing the business content objects. It throws an error UNCAUGHT_EXCEPTION - CX_RSD_NAME_ERROR. The details are below: Error analysis     An exception occurred which is explained in detail below.     The excep

  • Folder icon in a hierarchical tree

    Hello, I don't know how can I put a folder icon in a hierarchical tree. I have this query, and I know I have to change the 4th column, but I don't know how to do it. SELECT -1,level,d_carpeta, null, id_carpeta FROM DOCUMENTUM.doc_carpetas START WITH