Perl script not rendering values

I have a perl script that runs a form submission and sends me an email after user completes the form.
Once I get the mail, i see the form fields BUT I do not see the values that the user would enter.
Here is a snippet:
print MAIL "...If Contractor, employed by: $FORM{'Contractor_Employer'}\n";
print MAIL "...If Visitor, employed by: $FORM{'Visitor_Employer'}\n";
print MAIL "...If Reporting unsafe condition or other safety related issue:\n";
print MAIL "$FORM{'Unsafe_Conditions'}\n";
print MAIL "\n";
print MAIL "IDENTIFICATION DETAILS\n";
print MAIL "...Full Name of Injured: $FORM{'NameInjured'}\n";
print MAIL "...Job Title: $FORM{'JobTitle'}\n";
print MAIL "...Date Hired: $FORM{'DateHired'}-$FORM{'DHMonth'}-$FORM{'YearHired'} \n";
print MAIL "...Gender: $FORM{'Gender'}\n";
print MAIL "...Manager's Name: $FORM{'Emp_Manager
any ideas?

My idea would be: debug it.
Your post had so little technical information so I can't be more specific, sorry.
[I know this isn't a Perl forum, but since isn't one on OTN, I'm OK with you asking it here]

Similar Messages

  • Complex (Indian) scripts not rendering in latest build of Jdk8

    Complex (Indian) scripts not rendering in JavaFx Text components of latest build of JDK8.
    I am using early access build b89 .
    I remember it was working in earlier JDK8 release when the button components were not bigger.

    You should probably post this in the 'Oracle Connector for Outlook' discussion forum for an appropriate response:
    Connector for Outlook
    OTN

  • Perl scripts not recognized by Apache 1.3

    Hello Discussions-Tiger Forums,
    I need to do some troubleshooting of Perl scripts on a PowerPC Mac, as I wait for my company to get a new computer for me. The PowerPC is running Apache 1.3 .
    My problem is that the Apache server is not running Perl scripts, but instead is displaying them like text files. For example - localhost:8080/hello.pl shows the lines of perl code instead of showing the "hello world" message.
    I've uncommented the "AddModule mod_perl.c" line in the htpd.conf and restarted the web server via the "Sharing" Preferences panel.
    Also - how do I tell Apache where perl is?
    - Larry
    Message was edited by: XRayLarry

    Thanks for the CHMOD hint and the link. Inspired by the information, I am going to do some research into AddHandler and ScriptAlias. I am working on a site with a nonstandard location for cgi scripts, and the previous coder is out on vacation.
    I'll report back here on my progress or lack thereof.

  • Perl Scripts not executable in web server

    I have a MacMini running 10.4 Server. It is hosting a web site for some surveys that are created using SurveyTracker.
    The person creating the surveys SMB connects to the web server to create the files in the share point that is also the main web directory (not /Library/WebServer/Documents but a different location).
    The problem is, when the person does the SMB file create, it does not create the pl scripts with the 'x' bit enabled. Instead of rwx/rwx/r-x (775) it comes rw-/rw-/r-- (664).
    I have tried setting a cron job to auto chmod to 775 every five minutes but the cron job does not run.
    Is there a way to change the permsissions on the folder, i.e. Sticky Bit, so any file being created in the folder wil have the 'x' bit automatically?
    The option of giving ssh access to the person creating the file is not as easy as it sounds, as they do not understand terminal/ssh.
    I have mod_perl and mod_cgi enabled in the webserver settings, and allow CGI-Execute.
    XServe   Mac OS X (10.4.3)  

    Hi Ludek,
                   After installing default printer on Server, i got No printers installed.
    below is my code, (checking in Default printer installed or not in TRY)
    CR_TGL_EBL.HasPrintButton = False
    CR_TGL_EBL.ReportSource = rpt
    Try
    rpt.PrintToPrinter(No_of_copies, True, 0, 0)
    Catch ex As Exception
    Page.ClientScript.RegisterStartupScript([GetType](), "printer Problems", (Convert.ToString("alert('" + ex.Message + " ")) +"Your associated printer not working contact the admin!');", True)
    End Try
    Even i installed default printer i got alert message, How to get direct print in server.
    Locally it's working fine. Once i enable printtoprinter it's loading only...
    Please help me to solve this issue...
    Regards,
    Mani.

  • Perl script to delete attributes with space value

    Hi,
    We are using Iplanet Ldap Directory server on hp-UX 11i.
    I have a problem here with the attribute values.There is a space (a blank space) for few attributes across the directory server.
    They seem to be normal when lokked through the ldap console. But when retrieving data through ldapsearch utility they appear as Junk character.
    The only solution for this may be find and delete those attributes and add new one's.
    eg: telephoneNumber :: RASWD== ( when the attribute has one space value,nothing else)
    My issue is iam not able to trace the attributes through perl ldap scripts.
    If anyone can help me out with a script it would be great.There are few thousand employees data appear corrupted.
    Thanks in advance.

    This is how SunOne avoids storing lots of extra spaces (and thus using disk/memory) It base 64 encodes the entries. I believe you can use the -B flag to ldapsearch to display the entry as it really appears not encoded.
    If you really wanted to ideantify them I would write a perl script to locate attribute:: in a db2ldif of the install.
    That would at least tell you which ones have the issue with spaces

  • Adobe Form in HRFORMS: Value of Textfield on Masterpage is not rendered!

    Hi all,
    I design a new form using HRFORMS. When I put a simple textfield on a master page and give the textfield a default value and render my form using transaction PC00_M01_CALC_SIMU, the value of the textfield is NOT rendered.
    I am using Adobe LiveCycle Designer 8.0 within SAP and the Adobe Acrobat 7.0.9 for rendering PDF documents.
    The ADS Server Version is: 800.20070708051308.406522
    The funny thing is, if you do the same things in Adobe Designer (stand-alone) it works perfectly as it should.
    Is this a known bug?
    Thanks.
    Maik

    I have figured out myself.
    It is a bug in SAP and has also been reported as a bug to SAP.
    It works fine with all Adobe Designer stand-alone versions as well as Adobe LiveCycle Forms Server 7 and 8.
    As a workaround in SAP you should use STATIC TEXT with "FLOATING FIELDS" instead of TEXT FIELDS.

  • Customization - Additional column inserted in Inbox - value not rendered

    Hello,
       I have a requirement for customizing the inbox and populating the new inbox column with additional value. I made coding updates and everything looks good but the inbox does not render the new value at all. I made these updates and overrides.
    Added the column name and value in \apps\cq\workflow\components\inbox\list\json.jsp . When I go to http://localhost:4502/libs/cq/workflow/content/inbox/list.json?_dc=1358787785033&start=0&l imit=40, I am able to see the addition variable and value added and displayed in list.json. For e.g. view of list.json
               "payloadPath": "/content/dam/geometrixx-outdoors/articles/a-simple-plan.jpg",
               "payloadPath_xss": "/content/dam/geometrixx-outdoors/articles/a-simple-plan.jpg",
               "payloadSummary": {
            "lifestage": "Authored",
               "payloadTitle": "a-simple-plan.jpg",
               "payloadType": "dam:Asset",
       2.  Override and updated \apps\cq\workflow\extensions\inbox\cols. Added a new column, lifestage.js. Code in that js file is
        "header":CQ.I18n.getMessage("LifecycleStage"),
        dataIndex:"lifestage",
        ranking:30
        3. The inbox/list.json shows the value lifestage correctly. But still it doesnot populate 'lifestage' value in the inbox column. If I replace the dataIndex:"lifestage" with dataIndex:"currentassignee" or any other thing, the Lifestage column in Inbox is populated with the "CurrentAssignee".
    Why is the lifestage value though visible through list.json not visible in Lifestage column? What else needs to be additionally done?
    Thanks,

    Sham,
         I  followed exactly all steps like you mentioned. The value was not rendered. I put the alert messages. Please see the code below.
    As lifestage is not subpart of payloadSummary, tried both record.get("lifestage") and (record.get("payloadSummary").lifestage but still both alerts shows undefined.I see alerts for 'Inside renderlifestage' but the next alert shows 'undefined'.
      renderLifestage: function(value, p, record) {
                alert('Inside renderlifestage');
                alert(record.get("payloadSummary").lifestage);
                alert(record.get("lifestage"));
                return lifestageTpl.apply({
                   "lifestage": record.get("payloadSummary").lifestage
    Here is the output from inbox/list.json
          "item": "/etc/workflow/instances/2013-01-22/model_360104180212070/workItems/node4_etc_workflow_in stances_2013-01-22_model_360104180212070",
          "title": "Authorship Workflow",
          "description": "Select author for the authorship workflow.",
          "dialog": "/apps/lexmark/dialog/authorshipDueDateDialog",
          "participant": "",
          "currentAssignee": "Administrator",
          "startTime": 1358880950665,
          "metaData": {
            "workItem": {
              "historyEntryPath": "/etc/workflow/instances/2013-01-22/model_360104180212070/history/1358880950664"
            "instance": {
              "currentJobs": "",
              "currentJobs_xss": "",
              "workflowTitle": "authorship_workflow_test",
              "workflowTitle_xss": "authorship_workflow_test",
              "startComment": "authorship_workflow_test",
              "startComment_xss": "authorship_workflow_test"
          "payload": "/damadmin.html#/content/dam/geometrixx-outdoors/articles/downhill-ski-conditioning.jpg",
          "payload_xss": "/damadmin.html#/content/dam/geometrixx-outdoors/articles/downhill-ski-conditioning.jpg",
          "payloadPath": "/content/dam/geometrixx-outdoors/articles/downhill-ski-conditioning.jpg",
          "payloadPath_xss": "/content/dam/geometrixx-outdoors/articles/downhill-ski-conditioning.jpg",
          "payloadSummary": {
            "icon": "/content/dam/geometrixx-outdoors/articles/downhill-ski-conditioning.jpg/jcr:content/rend itions/cq5dam.thumbnail.48.48.png"
          "lifestage": "Authored",
          "payloadTitle": "downhill-ski-conditioning.jpg",
          "payloadType": "dam:Asset",
          "lastModifiedBy": "admin",
          "lastModified": 1323947520464,
          "lockedBy": "",
          "lockedBy": "",
          "timeUntilValid": 0,
          "onTime": 0,
          "offTime": 0,
          "monthlyHits": 0,
          "replication": {
            "numQueued": 0,
            "publishedBy": null
          "scheduledTasks": [
          "inWorkflow": true,
          "workflows": [{
              "model": "Authorship_Workflow",
              "started": 1358880950439,
              "startedBy": "admin",
              "suspended": false,
              "workItems": [{
                  "item": "Authorship Workflow",
                  "assignee": "admin"
          "scheduledTasks": [
          "comment": "authorship_workflow_test",
          "workflowTitle": "authorship_workflow_test",

  • Value of Textfield on Masterpage is not rendered!

    Hi all,
    I design a new form using HRFORMS. When I put a simple textfield on a master page and give the textfield a default value and render my form using transaction PC00_M01_CALC_SIMU, the value of the textfield is NOT rendered.
    I am using Adobe LiveCycle Designer 8.0 within SAP and the Adobe Acrobat 7.0.9 for rendering PDF documents.
    The ADS Server Version is: 800.20070708051308.406522
    The funny thing is, if you do the same things in Adobe Designer (stand-alone) it works perfectly as it should.
    Is this a known bug?
    Thanks.
    Maik

    I have figured out myself.
    It is a bug in SAP and has also been reported as a bug to SAP.
    It works fine with all Adobe Designer stand-alone versions as well as Adobe LiveCycle Forms Server 7 and 8.
    As a workaround in SAP you should use STATIC TEXT with "FLOATING FIELDS" instead of TEXT FIELDS.

  • Child component values submitted when parent component not rendered

    This pertains to the standard JSF components, but may carry over into Sun JSC.
    I have a column in a dataTable that contains a checkbox. The rendered attribute on that column is tied to a backing bean property. The column is/is not displayed as appropriate per the value of that property - great.
    Here's the rub: When that column is not rendered and the form is submitted the values for the checkboxes are still being submitted and my data model is being updated for those non-rendered components. Seems like this shouldn't happen, but the real problem is that the values submitted for those checkboxes are always 'false'. Seems like JSF is out of sync in this case in what it does between when the form is loaded and when it is submitted (perhaps it is not loading the values from the data model yet it is updating them on the submit - with garbage).
    To get this to work as I expected I had to set the rendered attribute on the checkbox components to match the rendered attribute on the column that contains them.
    Is there a bug here?

    This pertains to the standard JSF components, but may carry over into Sun JSC.
    I have a column in a dataTable that contains a checkbox. The rendered attribute on that column is tied to a backing bean property. The column is/is not displayed as appropriate per the value of that property - great.
    Here's the rub: When that column is not rendered and the form is submitted the values for the checkboxes are still being submitted and my data model is being updated for those non-rendered components. Seems like this shouldn't happen, but the real problem is that the values submitted for those checkboxes are always 'false'. Seems like JSF is out of sync in this case in what it does between when the form is loaded and when it is submitted (perhaps it is not loading the values from the data model yet it is updating them on the submit - with garbage).
    To get this to work as I expected I had to set the rendered attribute on the checkbox components to match the rendered attribute on the column that contains them.
    Is there a bug here?

  • Rendered=false column is not returning value in simpleSearch Query Region.

    Hi Guru's,
    I have a simpleSearchPanel with two search columns Order Number (Rendered=true, i.e Visible to User in the form) and Order Id(Rendered=False, i.e Non visible to User in the form) which are getting values from LOV. The LOV selection Order Number and Order Id are getting values and Order Number column is rendered true(visible) query able to return the values, but Order Id is not getting values because Rendered=False/Not visible Field.
    Unfortunately i can't make OrderId filed as "formValue" because of simpleSearchPanel (autoCustoomizationCritirea) query region.
    I appreciate your help.
    Regards
    Pathi

    its not the problem with simpleSearchPanel, it is the messageComponentLayout within simpleSearchPanel which is restricting the formValue.
    just change the region style to defaultDoubleColumn and create the formValue into it.
    This should solve your problem..
    --Prasanna                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Calling the DTExec from Perl Script and need to get the Return Value (Sucess or Failure)

    I am able to execute the SSIS Package from Perl Script using DTExec. But i need to get the return code of the SSIS Execution. Is their any option available to get the Success or Failure information from Perl ?

    Exit codes returned from dtexec utility             
    When a package runs, dtexec can return an exit code. The exit code is used to populate the ERRORLEVEL variable, the value of which can then be tested in conditional statements or branching logic within a batch file. The following table lists
    the values that the dtexec utility can set when exiting.
    http://technet.microsoft.com/en-us/library/hh231187.aspx
    There's a wrinkle if the package is running in the SSIS Catalog:
    http://www.mattmasson.com/2012/02/exit-codes-dtexec-and-ssis-catalog/
    David
    David http://blogs.msdn.com/b/dbrowne/

  • Folder Action to Launch Perl Script

    Hello.
    I wrote a perl script which I wanted to execute when a file was dropped into a folder. I added a folder action with a very simple applescript:
    on adding folder items to this_folder after receiving added_items
    do shell script ¬
    ("perl /Users/Alexander/Library/Scripts/gte2.pl")
    end adding folder items to
    The folder action didn't do anything, any thoughts on what I'm doing wrong? Note, the perl script works fine when I run it from the terminal.
    thanks.

    Thanks Camelot, I appreciate the help. My script below is trying to read data from a file in folder in my system. So I will try your suggestion, I didn't realize the environment and path my be different.
    Regards Alex
    #!/usr/bin/perl -w
    #This program is to convert files from gamin running GPS watch to text file which can be loaded into excel.
    # To make executable, remember to set: chmod u+x <file>
    #set all the flags. Note the flags are used to stop the matching
    $i = 1; $k = 0; $start = "no";
    #Open data file and find values
    open(DATA,"/Users/Alexander/Alex's Misc/Health/Garmin_Conversion/run.tcx") || die "Couldn't open file*\n";
    #read in the data line by line until "end of file"
    while (<DATA>){
    #start parsing for information to keep
    if (/.<Id>./) {
    @Idline=split(/>/);
    @Idbeat=split(/T/,$Idline[1]);
    $Id=$Idbeat[0];
    if (/.<Track>./){
    $start = "yes";
    if ($start eq "yes"){
    if (/.<Time>./) {
    @timeline=split(/T/);
    @timebeat=split(/Z/,$timeline[2]);
    $Time[$i]=$timebeat[0];
    elsif (/.<LatitudeDegrees>./) {
    @HRline=split(/>/);
    @HRbeat=split(/</,$HRline[1]);
    $Latitude[$i]=$latbeat[0];
    elsif (/.<LongitudeDegrees>./) {
    @longline=split(/>/);
    @longbeat=split(/</,$longline[1]);
    $Longitude[$i]=$longbeat[0];
    elsif (/.<AltitudeMeters>./) {
    @altline=split(/>/);
    @altbeat=split(/</,$altline[1]);
    $Altitude[$i]=$altbeat[0];
    elsif (/.<DistanceMeters>./) {
    @distline=split(/>/);
    @distbeat=split(/</,$distline[1]);
    $Distance[$i]=$distbeat[0];
    elsif (/.<Value>./) {
    @HRline=split(/>/);
    @HRbeat=split(/</,$HRline[1]);
    $HR[$i]=$HRbeat[0];
    $i++;
    } #string matching
    } #if start flag is yes
    } #while data loop
    close (DATA) || die "couldn't close file.\n";
    #write all data to file in space delimited format
    open (NEWFILE, ">/Users/Alexander/Alex's Misc/Health/Garmin_Converted/$Id run") || die "can't create file.\n";
    $Time[0]="Time"; $Latitude[0]="Latitude"; $Longitude[0]="Longitude"; $Altitude[0]="Altitude"; $Distance[0]="Distance"; $HR[0]="HR";
    print NEWFILE "0 $Time[0] $Latitude[0] $Longitude[0] $Altitude[0] $Distance[0] $HR[0]\n";
    for ($j = 1; $j <= $i; $j++) {
    $k=$j+1;
    print NEWFILE "$j $Time[$j] $Latitude[$j] $Longitude[$j] $Altitude[$j] $Distance[$j] $HR[$j]\n";
    } #for j loop
    close (NEWFILE) || die "couldn't close newfile.\n";
    #This is the end of the program

  • How to launching a perl script by the "begin" script of a jumpstart

    Hi all,
    i have an urgent pb with my solaris jumpstart, let me explain to you :
    i want that the begin script launch some perl script, but i have a problem
    here is my "begin" script:
    echo "Begining ISO FLAR based jumpstart."
    echo ""
    echo "Starting Ullink Configuration"
    env > /tmp/env
    /bin/sh << EOF
    /usr/bin/perl /cdrom/.archives/admin-scripts/sethostname.pl
    EOFmy perl script use a STDIN
    with this configuration, the perl script is launching but it runs in a loop indefinitely with an error "use of uninitialized value", because (i think) a value is return to the begin scritp and not to the perl script.
    well, on a pre-installed solaris, if a launch the begin script, it happens the same thing, it runs in a loop, BUT if i comment the line "/bin/sh <<EOF" and "EOF", it works.
    at this step, i say "ok it's cool my script is working", but when i use it during the jumpstart instalaltion, the perl script does not start, without any particular error.
    here is my perl script, if you want to test :
    #!/usr/bin/perl -w^M
    # Set Hostname for Ullink Jumpstart^M
    ^M
    use strict;^M
    ^M
    sub hit_enter {^M
        print "Hit enter to continue\n";^M
        <STDIN>;^M
        print "\033[2J";^M
    }^M
    ^M
    sub get_hostname {^M
        my %towns_list = (^M
            'Paris' => 'PA',^M
            'New-York' => 'NY',^M
        );^M
    ^M
        my %sites_list = (^M
            'Office' => 'OFC',^M
            'Redbus' => 'RED',^M
            'Telehouse' => 'TLH',^M
            'DTC' => 'DTC',^M
            'iAdvantage' => 'IAD',^M
            'Nutley' => 'NUT',^M
            'Level3' => 'LV3',^M
            'Equinix' => 'EQX',^M
            'Tata' => 'TAT',^M
            'Switch-data' => 'SWI',^M
            );^M
    ^M
        my %usage_list = (^M
            'Production' => 'PRD',^M
            'UAT' => 'UAT',^M
            'DMZ' => 'DMZ',^M
        );^M
    ^M
        sub select_list {^M
            my $counter=-1;^M
            my %hash_list = @_;^M
            my @keys = keys %hash_list;^M
    ^M
            # Clear screen^M
            print "\033[2J";^M
            print "In which country this machine is hosted or will be host and will be used ?\n\n";^M
    ^M
            # Get all keys from hash^M
            my $key;
            while ($key = each %hash_list ) {^M
                $counter++;^M
                print "$counter - $key\n";^M
            }^M
    ^M
            print "\nChoose the number corresponding to your choice :\n";^M
            my $choice_number;
            chomp ($choice_number = <STDIN>);^M
    ^M
            # Verify answer^M
            if (($choice_number =~ /\d+/) and ($choice_number <= $counter)) {^M
                # Add choice to chosen hostname^M
                my $chosen=$hash_list{$keys[$choice_number]};^M
                return $chosen;^M
            } else {^M
                print "\nYour answer is not correct, you need to enter a number between 0 and $counter\n";^M
                &hit_enter;^M
                &select_list;^M
            }^M
        }^M
    ^M
        sub srv_number {^M
            print "\033[2J";^M
            print "What is the server number ?\n";^M
            my $server_number;
            chomp ($server_number = <STDIN>);^M
            if ($server_number =~ /\d+/) {^M
                return $server_number;^M
            } else {^M
                print "\nYour answer is not correct, you need to enter a number\n";^M
                &hit_enter;^M
                &srv_number;^M
            }^M
        }^M
    ^M
        my $full_hostname = &select_list(%towns_list).'-';^M
        $full_hostname = $full_hostname.&select_list(%sites_list).'-';^M
        $full_hostname = $full_hostname.'SRV-';^M
        $full_hostname = $full_hostname.&select_list(%usage_list).'-';^M
        $full_hostname = $full_hostname.&srv_number;^M
    ^M
        sub write_hostname2tmp {^M
            open (HOSTNAME, ">/tmp/set_hostname") or warn "Couldn't write $_[0] to temp file : $!\n";^M
                print HOSTNAME "$_[0]\n";^M
            close (HOSTNAME);^M
        }^M
    ^M
        print "\033[2J";^M
        print "Is $full_hostname the correct name for this server ? (y/n)\n";^M
        if (<STDIN> =~ /y|yes/i) {^M
            &write_hostname2tmp($full_hostname);^M
        } else {^M
            print "Would you like to retry (r) or set manually the hostname (s) ? (r/s)\n";^M
            if (<STDIN> =~ /s/i) {^M
                print "Type the full required name and hit enter when finished :\n";^M
                chomp ($full_hostname = <STDIN>);^M
                &write_hostname2tmp;^M
            } else {^M
                &get_hostname;^M
            }^M
        }^M
    }^M
    ^M
    # Start configuration^M
    print "\033[2J";^M
    print "\n########################################################\n";^M
    print "#\t\t\t\t\t\t       #\n";^M
    print "#\t\t\tULLINK\t\t\t       #\n";^M
    print '#  Solaris Environnement Installation for Datacenters  #';^M
    print "\n#\t\t\t\t\t\t       #";^M
    print "\n########################################################\n\n";^M
    print "Before starting installation, you need to enter a set of informations.\n(answer to all questions, you can Ctrl+C to stop now)\n\n";^M
    &hit_enter;^M
    ^M
    &get_hostname;^Mthank for your help
    Edited by: ullink on Jun 25, 2009 6:05 AM

    Hi Manju,
    You can try the following command and check if any helps:
    Get-Exchangeserver |where-object{$_.AdminDisplayVersion -like "Version 15*"} |Get-MailboxStatistics | Ft -auto -wrap DisplayName,database,servername,*size*,*time*
    Best regards,
    Niko Cheng
    TechNet Community Support

  • Runtime.exec("Perl Script writing and reading on I/O"), handling Streams

    Hi all !!
    In a first place : sorry for my english if it's not really understandable but I try to do as good as possible !
    I'm writing a GUI with Swing that will allow (in one of my multiple tables) the user to run a Perl Script.
    This Perl Script ask the user to choose a Folder ... then read all the files in this folder and for each file (xml File), extract the datas and put them in a database. But when a file that has to be inserted in the database contains this line : <Template_Used name="ST1.mtt"> and if the Template table in my database doesn't have the "ST1.mtt" stored ... the Perl Script ask to the user to give him the path of the file "ST1.mtt" so that the script can put the "ST1.mtt template" datas in the database.
    This script runs well when it is from a windows console.
    But I need a graphic interface !!!
    So I created a JButton "Process a folder".
    When the button is pressed, a JFileChooser appears and ask the user which Folder has to be processed.
    Then a Process is created with the command : ("cmd.exe /C \"C:\\Program Files\\Fluke\\Ansur\\ProcessFolder.bat\").
    The BatFile :
    {code}cd C:\Documents and Settings\tsd\Desktop\Gael-Project\Project_Files
    perl Process.pl
    exit{code}
    At this moment everything is working well.
    But my Process.pl (which is 300 lines long ... and that you don't even want to hear about), ask in a first time the Path of the folder to process and sometimes ask the path to a file (a template file).
    So I need to read and wirte on the STDIN/STDOUT during the exec of the Process.
    In order to handle this I created two different threads : one reading the Process.getInputStream with a BufferedReader and one other writing on the Process.getOutputStream with a PrintWrinter.
    What I need to do is :
    When I read a line from the InputStream saying "I need the path of the ST1.mtt file", I should run a JFileChooser ... the user find the file in the computer ... and I write in the OutputStream the path of the file, so that my Perl Script doesn't have un Unitialised value on <STDIN> and can continue to process !!
    I'm pretty sure it's possible ... because at the moment I just used a trick :
    When the user push the "process a folder" button, I write the paths in the OutputStream before than the script needs it and it works !
    But I need to write in the OutputStream only when it is time !!!
    Any idea ??
    Here are some parts of my code :
    {code}
    String filename = File.separator+"tmp";
              JFileChooser fc = new JFileChooser(new File(filename));
              fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY );
              // Show open dialog; this method does not return until the dialog is closed
         fc.showOpenDialog(null);
         Folder = fc.getSelectedFile();
              new GoodExec(cmd);
    {code}
    {code}
    public class GoodExec {
         public static Process proc;
         public static StreamGobbler errorGobbler;
         public static StreamGobbler inputGobbler;
         public static StreamGobbler outputGobbler;
         public GoodExec(String cmd)
         try
                   Runtime rt = Runtime.getRuntime();
              proc = rt.exec(cmd);
         // any error message?
         errorGobbler = new
         StreamGobbler(proc.getErrorStream(), "ERROR");
         // any input?
         inputGobbler = new
         StreamGobbler(proc.getInputStream(), "INPUT");
         // any output?
              outputGobbler = new
              StreamGobbler(proc.getOutputStream(), "OUTPUT");
         // kick them off
         errorGobbler.start();
         inputGobbler.start();
         outputGobbler.start();
         // any error???
         int exitVal = proc.waitFor();
         System.out.println("ExitValue: " + exitVal);
         } catch (Throwable t)
         t.printStackTrace();
    {code}
    {code}
    public class StreamGobbler implements Runnable
    InputStream is;
    OutputStream os;
    String type;
    Thread thread;
    public static String chaine;
    StreamGobbler(InputStream is, String type)
    this.is = is;
    this.os=null;
    this.type = type;
    StreamGobbler(OutputStream os, String type)
    this.os = os;
    this.is=null;
    this.type = type;
    public void start () {
         thread = new Thread(this);
         thread.start ();
    public void run()
    try
    if (is == null){
         PrintWriter toProgram = new PrintWriter(os);
         File FolderToProcess = ProcessFolder.Folder;
    String Folder = FolderToProcess.getPath();
    toProgram.write(Folder);
    toProgram.close();
    else {
         if (os == null){
         InputStreamReader isr = new InputStreamReader(is);
    BufferedReader br = new BufferedReader(isr);
    String line=null;
    String comp = "Please enter the exact path of the directory that contains the files you want to process.";
    while ( (line = br.readLine()) != null){
         if (type.equals("INPUT")){
              chaine+=line+"\n";
         if (line.equals(comp)) {
              System.out.println("give directory");RUN A JFILECHOOSER AND GIVE THE DIRECTORY TO THE OUTPUTSTREAM
    System.out.println(type + ">" + line);
    is.close ();
    catch (IOException ioe){
         ioe.printStackTrace();
    {code}
    And here is an example of a simple perl script that could be used (it s a simple one !!) :
    {code}
    #!/usr/bin/perl -w
    use strict;
    print "Please enter the exact path of the directory that contains the files you want to process.\n";
    my $dir= <STDIN>;
    chomp ($dir);
    print "titallala $dir";
    if (the template of the file is not in the database){
    print "Please give me the template so that I can put it in the database";
    $dir= <STDIN>;
    chomp ($dir);
    {code}
    Thank you for your help ... if it's possible to help me !!
    Gael

    BalusC -- The line that gives me my NullPointerException is when I call the "DisplayProduct()" method. Its a dumb question, but with NetBeans how do I find out which reference could be null? I'm not very familiar with how NetBeans works with finding out how to debug. Any help you can give me would be greatly appreciated.The IDE is com-plete-ly irrelevant. It's all about the source code.
    Do you understand anyway when and why a NullPointerException is been thrown? It is a subclass of RuntimeException and those kind of exceptions are very trival and generally indicate an design/logic/thinking fault in your code.
    SomeObject someObject = null; // The someObject reference is null.
    someObject.doSomething(); // Invoking a reference which is null would throw NPE.

  • Design view of jspx not rendering : Error exercising tag : afh:head

    I'm using JDeveloper 10.1.3.4 and I have an intermittent problem where by the jspx does not render correctly in design view - it just shows a whole load of nested boxes.
    By following a suggestion from another website I turned on "Design time messages in log" in jdeveloper JSP visual editor preferences.
    The error messages being sent to the log window are :
    Error exercising tag : afh:head
    java.lang.NullPointerException
         at oracle.adfinternal.view.faces.renderkit.AdfRenderingContext.getTranslatedString(AdfRenderingContext.java:70)
         at oracle.adfinternal.view.faces.renderkit.core.xhtml.jsLibs.GlobalVariablesScriptlet.outputScriptletContent(GlobalVariablesScriptlet.java:49)
         at oracle.adfinternal.view.faces.renderkit.core.xhtml.jsLibs.Scriptlet.outputScriptletImpl(Scriptlet.java:111)
    Error exercising tag : af:forEach
    javax.servlet.jsp.JspTagException: 'begin' and 'end' should be specified if 'items' is not specified
         at oracle.adfinternal.view.faces.taglib.ForEachTag._validateAttributes(ForEachTag.java:320)
         at oracle.adfinternal.view.faces.taglib.ForEachTag.doStartTag(ForEachTag.java:93)
    Error exercising tag : afh:body
    java.lang.NullPointerException
         at oracle.adfinternal.view.faces.renderkit.core.CoreAdfRenderingContext.getStyleClass(CoreAdfRenderingContext.java:211)
         at oracle.adfinternal.view.faces.renderkit.core.xhtml.XhtmlRenderer.renderStyleClass(XhtmlRenderer.java:338)
         at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelPartialRootRenderer._renderLibraryDownloadElement(PanelPartialRootRenderer.java:480)
         at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelPartialRootRenderer.renderPPRSupport(PanelPartialRootRenderer.java:340)
    How can I fix this ?
    Cheers,
    Brent

    Hi Didier,
    Sorry, intermittent problem is not very descriptive ! What I actually meant is that some of my applications have the problem while others dont. Once the problem exists, it always does regardless of restarting JDeveloper.
    Starting JDeveloper using the console provided similar error message to outputting the JSP visual editor to the log file :
    SEVERE: Element End name:head does not match start name:script
    04-Dec-2009 17:28:38 oracle.adfinternal.view.faces.io.HtmlResponseWriter endElem
    ent
    SEVERE: Element End name:html does not match start name:div
    Reading other posts, problems seemed to stem from errors within the faces-config or web.xml files so I compared them between apps displaying pages correctly and ones that weren't. I found a difference in the filter-mapping section of the web.xml. Changing the entries to match the applications that displayed correctly has worked !!
    The entries for the apps that didn't display correctly :
        <filter-mapping>
            <filter-name>adfFaces</filter-name>
            <servlet-name>Faces Servlet</servlet-name>
            <dispatcher>FORWARD</dispatcher>
            <dispatcher>REQUEST</dispatcher>
        </filter-mapping>
        <filter-mapping>
            <filter-name>adfBindings</filter-name>
            <url-pattern>*.jsp</url-pattern>
        </filter-mapping>
        <filter-mapping>
            <filter-name>adfBindings</filter-name>
            <url-pattern>*.jspx</url-pattern>
        </filter-mapping> 
      <filter-mapping>
        <filter-name>adfBindings</filter-name>
        <servlet-name>ordDeliverMedia</servlet-name>
      </filter-mapping>
      <filter-mapping>
        <filter-name>jhsAuthenticationFilter</filter-name>
        <url-pattern>*.jsp</url-pattern>
      </filter-mapping>
      <filter-mapping>
        <filter-name>jhsAuthenticationFilter</filter-name>
        <url-pattern>*.jspx</url-pattern>
      </filter-mapping>... and the entries for the apps that did display correctly :
        <filter-mapping>
            <filter-name>adfFaces</filter-name>
            <url-pattern>*.jsp</url-pattern>
        </filter-mapping>
        <filter-mapping>
            <filter-name>adfFaces</filter-name>
            <url-pattern>*.jspx</url-pattern>
            <dispatcher>REQUEST</dispatcher>
            <dispatcher>FORWARD</dispatcher>
        </filter-mapping>
        <filter-mapping>
            <filter-name>adfBindings</filter-name>
            <url-pattern>*.jsp</url-pattern>
        </filter-mapping>
        <filter-mapping>
            <filter-name>adfBindings</filter-name>
            <url-pattern>*.jspx</url-pattern>
            <dispatcher>REQUEST</dispatcher>
            <dispatcher>FORWARD</dispatcher>
        </filter-mapping>
        <filter-mapping>
            <filter-name>adfBindings</filter-name>
            <servlet-name>ordDeliverMedia</servlet-name>
        </filter-mapping>
        <filter-mapping>
            <filter-name>jhsAuthenticationFilter</filter-name>
            <url-pattern>*.jsp</url-pattern>
        </filter-mapping>
        <filter-mapping>
            <filter-name>jhsAuthenticationFilter</filter-name>
            <url-pattern>*.jspx</url-pattern>
        </filter-mapping>Somehow the filter-mapping entries for the adfFaces and adfBindings filter got all screwed ? Strange as the application has always worked fine, the only (obvious) problem has been the jspx pages not rendering properly in design view.
    Once updating the web.xml with the correct value for these two entries, the pages are displayed correctly :)
    While I don't like blindly making changes like this to the web.xml - the application still seems to function !
    Cheers,
    Brent

Maybe you are looking for