Include script inside tag code

Hello,
I am trying to produce the same result as
<c:import url="some_file.jsp" />in my tag. For example, I have an object which holds a File object called "jspScript". I would like a tag that can be used this way.
<report:showCustomReport report="${report}" />inside the tag, the code would look something like this:
public class ShowCustomReportTag extends TagSupport {
    public int doStartTag() {
        File script = getReport().getJspScript();
        // <c:import url="${script}" /> ??
        return SKIP_BODY;
    public void setReport(CustomReportDisplay report) { ... }
    public CustomReportDisplay getReport() { ... }
}Any help is appreciated.

It appears (through use, never looked to hard) that the c:impot tag uses an HttpURLConnection to make a connection to the resource, then reads the response and either prints it to the page or stores it in a variable in scope.
Knowing that, your job would be to make an HttpURLConnection request to the given resource and read what it has to say.
It may be beneficial to identify where the resource is, ie: is it local to the ServletContext or an absolute URL beginning with a protocol.
If it is local, perhaps use a RequestDispatcher.include() to do the job. Otherwise do the whole HttpURLConnection thing...
Just a guess, though, on how c:import works.

Similar Messages

  • Problem using jsp:include from inside a custom tag

    Hi, All !
              I have a problem using <jsp:include> from inside a custom tag. Exception is:
              "java.lang.ClassCastException: weblogic.servlet.jsp.BodyContentImpl"
              Apparently, weblogic tries to cast BodyContentImpl to JspWriterImpl and
              could not do this. Is it a bug, since in the 1.1 spec is said: "The
              BodyContent is a subclass of JspWriter that can be used to process body
              evaluations so they can retrieved later on."
              My code is:
              <wfmklist:items>
              <jsp:include page="item.jsp" flush="true"/>
              </wfmklist:items>
              

    This is an area of contention with WL. It is not so tolerant with regards to
              the spec. I spent several days recently trying to convince it to accept the
              specification in regards to bodies and includes and it appears to have
              successfully rebuffed my efforts.
              Frankly, this is very disappointing. It appears that some shortcuts were
              taken on the way to JSP 1.1 support, and the result is a very hard-coded,
              inflexible implementation. As I have not seen the implementation myself, I
              hate to assume this, however one could posit that the term "interface" was a
              foreign concept during the implementation, other than as some annoying
              intermediary reference requiring an immediate cast to a specific Weblogic
              class, which in turn is apparently required to be final or have many final
              methods, as if being optimized for a JDK 1.02 JIT.
              I am sorry that I don't have any positive suggestions other than to use a
              URL object to come back in an execute the necessary "include" directly. You
              lose all context (other than session) and that can cause its own problems.
              However, you can generally get the URL approach to work, and you will
              hopefully avoid further frustration.
              Peace,
              Cameron Purdy
              Tangosol, Inc.
              http://www.tangosol.com
              Tangosol: How Weblogic applications are customized
              "Denis" <[email protected]> wrote in message
              news:[email protected]...
              > Hi, All !
              > I have a problem using <jsp:include> from inside a custom tag. Exception
              is:
              > "java.lang.ClassCastException: weblogic.servlet.jsp.BodyContentImpl"
              >
              > Apparently, weblogic tries to cast BodyContentImpl to JspWriterImpl and
              > could not do this. Is it a bug, since in the 1.1 spec is said: "The
              > BodyContent is a subclass of JspWriter that can be used to process body
              > evaluations so they can retrieved later on."
              >
              > My code is:
              > ...
              > <wfmklist:items>
              > <jsp:include page="item.jsp" flush="true"/>
              > </wfmklist:items>
              > ...
              

  • Include python script inside an app

    Hi all, I'm writing an applescript app which should use a python script.
    how can I include the script inside the apple and have it called by the applescript?
    Thank you!

    Now, is there a way to let the user choose both the output file directory and the output file name (out.iso)?
    To get the filename, add this after the code to select the directory:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    font-weight: normal;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #E6E6EE;
    overflow: auto;">
    set outPutName to text returned of (display dialog "Now, please enter a filename:" default answer "out" with title "Enter Filename") & ".iso"</pre>
    But you need to remove "quoted form of the" from dirOutput.
    Also, "set dirOutput to POSIX path of the dirOut" is not needed.
    so, this should work:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    font-weight: normal;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #E6E6EE;
    overflow: auto;">
    set dirOut to (POSIX path of (choose folder with prompt "Scegli la posizione in cui salvare il file convertito"))
    set outPutName to text returned of (display dialog "Now, please enter a filename:" default answer "out" with title "Enter Filename") & ".iso"
    if outPutName is ".iso" then set outPutName to "out.iso" -- simple error check for blank name
    if outPutName contains "/" then set outPutName to "out.iso" -- simple error check for bad charater in name
    set fullPathOut to quoted form of (dirOut & outPutName)
    </pre>
    Tony

  • Break points set in an included script during debugging sporadically jump to the last line of the included script

    As I stated in the title, I use the ScriptInclude command quite extensively, because we have at our company a policy of maintaining one large-ish (roughly 7k lines) function library which is included by various individual evaluation scripts. Debugging this with break points is often the only (useful) way to see into the state of the script, so I depend on them.
    My problem is that often when I debug a script calling the function library, setting a break point in that library and running into it during debug mode will not transport the cursor to the location of the current break point, but instead to the very end of the included script. I have noticed this with a separate pair of scripts, as well, which includes a similar size script to call functions from (roughly 2k lines).
    Now I wonder if this has to do with the size of the scripts included, or if it is dependent on something else. It seems to not be affected by restarting DIAdem, and sometimes it works as intended, but I have not been able to reliably replicate indivdual occurrences one way or the other.
    Has anyone else had this problem happen to them?
    Leo Zschokke
    Test Engineer C-EPS
    ThyssenKrupp Presta AG

    Leo
    I also use scriptincludes extensively, Most of mine are in the range of 500 to 2000 lines.  Usually I organize them in logical code topics,  I like to use them to hold one class most of the time.  When I debug these I can set a breakpoint, and it will stop at that location.
    I also use custom log class as well, I find this quite helpful, in the applications that are unattended.
    The only thing I can think of to try is to separate the 7k file into 2 2k line files and then script include them separately.
    Paul
    ps. I sometimes need to have intellisense work from a file that was scriptincluded, this requires copying the file into the end of the main script.  (you most likely already know this   )
    One other note, Are you talking about debuging code in a SUD, that is whole different problem to deal with.

  • W3C validator and scripts inside body

    Hi all
    I'm just wondering if placing <script ...
    ></script>
    inside the body tag is considered invalid html (transitional
    4.01) ?
    I tried to validate a page and got dozens of errors that all
    point to things like:
    Line 37, Column 83: end tag for element "I" which is not
    open:
    ... your extension is</i> '+ext+'</p>';
    the html supposedly invalid is actually part of a javascript
    string in a js function. I don't
    understand how the validator thinks I am closing tags that I
    did not open. It's open somwehere else
    in the javascript function... And why does the validator try
    to validate html that's inside
    javascript functions?
    The validator however does NOT mention anything about the
    javascript being inside the body tag and
    not in the head.
    So I'm wondering what is going on.
    seb (@webtrans1.com)
    high-end web design:
    http://webtrans1.com
    Sign-up for a free beta test of SiteLander, an ingenious
    website-builder:
    http://webtrans1.com/sitelander/
    music:
    http://myspace.com/popmodelberlin

    Change this -
    var newHtml = '<p style="color:red"><i>Sorry,
    this file type is not
    supported:</i> '+ext+'</p>';
    to this -
    var newHtml = '<p style="color:red"><i>Sorry,
    this file type is not
    supported:<' + '/i> '+ext+'<' + '/p>';
    so that the closing tags are broken apart.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "(_seb_)" <[email protected]> wrote in message
    news:[email protected]...
    > Murray *ACE* wrote:
    >>> I'm just wondering if placing <script ...
    ></script>
    >>> inside the body tag is considered invalid html
    (transitional 4.01) ?
    >>
    >> It's not.
    >>
    >>> Line 37, Column 83: end tag for element "I"
    which is not open:
    >>> ... your extension is</i>
    '+ext+'</p>';
    >>
    >> You have to be devious. Can you show us the whole
    function?
    >>
    >
    > here's the whole function -but I don't see how html
    inside javascript can
    > be relevant to the validator!
    >
    > <script type="text/javascript">
    > function updateGall(){// UPDATE IMAGE, CAPTION, AND
    NAVIGATION, DEPENDING
    > ON filenum
    > var extar=files[filenum].split(".");
    > var ext=extar[extar.length-1];
    > if(/^(jpe?g|gif|png)$/i.test(ext)){
    > var newHtml = '<img src="'+files[filenum]+'" alt=""
    id="mainImg">';
    > }else if(/^(mov|mpe?g|avi)$/i.test(ext)){
    > var newHtml = '<OBJECT
    > CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
    WIDTH="320"
    > HEIGHT="256" CODEBASE="
    http://www.apple.com/qtactivex/qtplugin.cab"><PARAM
    > name="SRC" VALUE="'+files[filenum]+'"><PARAM
    name="SCALE"
    > VALUE="aspect"><embed src="'+files[filenum]+'"
    width="320" height="256"
    > scale="aspect"></embed></OBJECT>';
    > }else{
    > var newHtml = '<p
    style="color:red"><i>Sorry, this file type is not
    > supported:</i> '+ext+'</p>';
    > }
    > getId("fileDisplay").innerHTML=newHtml;
    > var o=getId("gallNav").getElementsByTagName("a");
    > for(var
    > i=0;i<o.length;i++){if(i==filenum){o
    .className="selected";}else{o.className="bla";}}
    > // image file without extension:
    > getId("caption").innerHTML=captions[filenum];
    > }
    > </script>
    >
    > The validator chokes on all the closing html tags
    > (</object>,</embed>,</p>,</i>)
    in this function, because these tags were
    > supposeldy never opened.
    >
    > ?...
    >
    > the actual page is here:
    >
    http://www.webtrans1.com/downloads/demos/image_gallery.php
    >
    > --
    > seb (@webtrans1.com)
    >
    > high-end web design:
    http://webtrans1.com
    >
    > Sign-up for a free beta test of SiteLander, an ingenious
    website-builder:
    >
    http://webtrans1.com/sitelander/
    >
    > music:
    http://myspace.com/popmodelberlin

  • Running sqlplus scripts from Java code?

    hi
    I need to programmatically run sqlplus scripts from Java code on a machine that doesn't have sqlplus installed.
    Is there any Java class library available for doing this?

    The Ant approach could probably work for me, thanks for the tip.
    The setup seems rather complex however, given the simplicity of the task. I would prefer just running a Java based SQL*Plus from in a separate process or doing this via an API that would allow me to run SQL*Plus scripts (parse script, substitute variables, run statements).
    Oracle SQL Developer v1.1 appears to include an API that does exactly this.
    The ScriptParser, Substitution and SQLPLUS classes in the oracle.dbtools.raptor.scriptrunner package (oracle.sqldeveloper.jar) seem to do just what I need based on my tests.
    Can I use these classes for this purpose in my application? Is repackaging allowed?
    Does Oracle have any plans for releasing this sort of functionality separately e.g. as part of the Instant Client?

  • Check current report user security inside CLR code

    Hi,
    I am writing a CLR stored procedure which will be invoked via a SSRS report.This SP will call a web service to fetch secure data. As this data is critical, we are implementing many security measures, one of the measure is to check inside CLR assembly,whether
    current report user is a part of an AD group (only this group will have access to read secure data) or not before I call web service .
    I am not sure if there is a way to check individual users inside CLR code . Any suggestion /input is appreciated.
    Thanks!
    Gaur

    Hi Gaur,
    Since this issue is related to Common Language Runtime (CLR), I will move this thread to .NET Framework forum. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated. 
    Thank you for your understanding and support.
    Regards,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • To automate the SQL scripts using PLSQL Code

    Hi All,
    I have 20 database server (11.2.0.3) hosted on  unix and Windows platforms.
    Every day I have to kill inactive sessions from all the these 20 database servers. So I have made a below script::
    connect sys/&&sys_password@&&tns_database_name as sysdba
    SPOOL E:\DELETE_INACTIVE_SESSIONS.SQL
    set PAGESIZE 1000
    set LIN 5000
    SET ECHO OFF;
    SET FEEDBACK OFF;
    SET HEADING OFF;
    select 'alter system kill session '||'`'||SID||','||SERIAL#||'`'||' immediate;'  from v$session where status='INACTIVE' and username in ('OSS_DICTIONARY','ADMINISTRATOR');
    SPOOL OFF;
    @@E:\DELETE_INACTIVE_SESSIONS.SQL
    Is there any way so that this execution of script can be automated in PLSQL code for 20 servers so and that code could be put in batch file for execution(i.e. can be execute through batch file from my windows laptop).
    Thanks

    Shrma wrote:
    Is there no way to handle the sql scripts in PLSQL code?
    Well, remember that PL/SQL is executed on a specific server by a certain user so you are already connected when executing a PL/SQL code.
    You could actually use a SQL Plus script to connect to different servers using connect and run your script.
    i.e.:
    SQL> connect sys/pwd_server1@db_server1
    SQL> @killinactive.sql
    SQL> connect sys/pwd_server2@db_server2
    SQL> @killinactive.sql
    But it does not make so much difference with my previous solution.
    Please explain exactly what you would like to do.
    Regards.
    Al

  • Include Service inside application bundle?

    I read a brief note in the Dev docs that you can include Services inside your application bundle to distribute them with your app.
    Is this possible with the newer Automator-created Services? 
    Where should they be stored in the bundle?
    When I peek inside bundles of other apps that provide services, such as BBedit, I don't see any Service files.
    I've tried this a bit but could not get them to show up in the Services menu after logout.
    Thanks,
    Joe

    Services for the App/Services menu and contextual menu? They're better and more prolific than ever.

  • Set by script the tag and/or the class of a paragraph style for HTML / EPUB export?

    Is it possible to set by script the tag and/or the class of a paragraph style for HTML / EPUB export?

    I found a way
    tell application "Adobe InDesign CS6"
      tell document 1
      tell paragraph style 2
      --get count of style export tag map
      tell style export tag map 1 -- HTML  , 2 = PDF
      --get export class
      --get export tag
      set export tag to "H1"
      set export class to "blue"
      end tell
      end tell
      end tell
    end tell
    and its works
    but thanks for help to use the class "style export tag map"

  • Script inside launchd plist

    Hi,
    playing with lauchd plists to get some feeling about how certain things works I came up with this script inside the plist
    <key>ProgramArguments</key>
    <array>
    <string>/bin/sh</string>
    <string>-c</string>
    <string>/bin/df -k| /usr/bin/grep /dev/ | /usr/bin/awk '{ OFS="     "; "date +%d-%b-%Y-%I:%M| getline; print $6, $1, $4, $5;}'</string>
    </array>
    Its close to what I try to do in my trial stage one (1), but see some unwanted and unexpected issues
    1. why is there a tab at the first line?
    2. Where is the first Item, is it replaced with the date or just ignored?
    3. Should I see the result(s) of date as a multi word? If I keep a space between +%d-%b-%Y and %I:%M i get a wrong result.
    *this is what I get*
    29-May-2010-10:53
    /Volumes/TimeMachine /dev/disk5s3 303667180 69%
    /Volumes/RAID01 /dev/disk4 55598552 93%
    /Volumes/Repository /dev/disk0s3 96066032 2%
    /Volumes/Data /dev/disk0s4 506853520 40%
    /Volumes/Applications /dev/disk1s4 11657776 73%
    *This what I actually did expect with the current script ( not what I want );*
    29-May-2010-10:53 / /dev/disk1s3 16190024 62%
    29-May-2010-10:53 /Volumes/TimeMachine /dev/disk5s3 303667180 69%
    29-May-2010-10:53 /Volumes/RAID01 /dev/disk4 55598552 93%
    29-May-2010-10:53 /Volumes/Repository /dev/disk0s3 96066032 2%
    29-May-2010-10:53 /Volumes/Data /dev/disk0s4 506853520 40%
    29-May-2010-10:53 /Volumes/Applications /dev/disk1s4 11657776 73%
    I thought that the date line will get printed every time for each line from the previous piped command
    *This is what I want ( stage 1 )*
    29-May-2010 10:53
    / /dev/disk1s3 16190024 62%
    /Volumes/TimeMachine /dev/disk5s3 303667180 69%
    /Volumes/RAID01 /dev/disk4 55598552 93%
    /Volumes/Repository /dev/disk0s3 96066032 2%
    /Volumes/Data /dev/disk0s4 506853520 40%
    /Volumes/Applications /dev/disk 1s4 11657776 73%
    *This is what I finally want ( stage 2 )*
    29-May-2010 10:53
    / 1s3 16190024 62%
    TimeMachine 5s3 303667180 69%
    RAID01 4 55598552 93%
    Repository 0s3 96066032 2%
    Data 0s4 506853520 40%
    Applications 1s4 11657776 73%
    Any help or ideas are welcome.
    Thanks
    PS.
    Here the total launchd plist script for copy>test ( check output path )
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>Debug</key>
    <true/>
    <key>InitGroups</key>
    <false/>
    <key>Label</key>
    <string>net.test.PlayWithMeScript2</string>
    <key>LowPriorityIO</key>
    <true/>
    <key>ProgramArguments</key>
    <array>
    <string>/bin/sh</string>
    <string>-c</string>
    <string>/bin/df -k| /usr/bin/grep /dev/ | /usr/bin/awk '{ OFS="     "; "date+%d-%b-%Y-%I:%M"| getline; print $6, $1, $4, $5;}'</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>ServiceDescription</key>
    <string>Play With me script</string>
    <key>StandardOutPath</key>
    <string>/Volumes/TestBedDevelopment/TestLogs/log3.txt</string>
    <key>StartInterval</key>
    <integer>60</integer>
    <key>WorkingDirectory</key>
    <string>/</string>
    </dict>
    </plist>

    Absolutely true, but to learn the effects of the shell created by the launchd and a comment somewhere on the web about "if it can in launchd do it there" and that I dont want to install to much, I choose for this, for now.
    Then, with all due respect to whoever wrote that article, he's an idiot
    Launchd has many uses, but it's not the right place to put a multi-step script with umpteen pipes and dependencies.
    Besides, I'm actually surprised it even remotely works, since launchd normally requires each element in the command to be in a separate <ProgramArguments> array element. In other words, your original:
    <key>ProgramArguments</key>
    <array>
    <string>/bin/sh</string>
    <string>-c</string>
    <string>/bin/df -k| /usr/bin/grep /dev/ | /usr/bin/awk '{ OFS="\t"; "date+%d-%b-%Y-%I:%M"| getline; print $6, $1, $4, $5;}'</string>
    </array>
    should really be more like:
    <key>ProgramArguments</key>
    <array>
    <string>/bin/sh</string>
    <string>-c</string>
    <string>/bin/df</string>
    <string>-k</string>
    <string>|</string>
    <string>/usr/bin/grep</string>
    <string>/dev/</string>
    <string>|</string>
    <string>/usr/bin/awk</string>
    <string>'{</string>
    <string>OFS="\t";</string>
    <string>"date+%d-%b-%Y-%I:%M"</string>
    <string>|</string>
    <string>getline;</string>
    <string>print</string>
    <string>$6,</string>
    <string>$1,</string>
    <string>$4,</string>
    <string>$5;}'</string>
    </array>
    and now you can see why it's a really, really bad idea to do. Far easier to just:
    <key>ProgramArguments</key>
    <array>
    <string>/usr/local/bin/myscript.sh</string>
    </array>
    and put all the logic in a separate file.
    The first line is gone because you're using getline within your awk statement, which tells awk to skip to the next line.
    I did hoped that didn't effect everything after the ;
    No. As per man awk:
    The ``function'' getline sets $0 to the next input record from the current input file;
    so getline moves onto the next line.
    How can I return a value from a launchd?
    What do you mean 'return a value from launchd'? You don't normally interact with launchd, so getting a return value from it doesn't make much sense.
    And why does my script keep running?
    because that's what launchd is for. By default, launchd is tasked with launching a process and keeping it running. So if a process fails it automatically gets restarted. This is normally what you want for system-level processes.
    Now, that said, launchd has a number of variations that you can use to tell it to launch processes at specific times, or when certain events happen, or only at boot time, etc., but you need to add them to your .plist so that launchd knows when (and when not) to launch/restart your process.

  • Jsp:include... tags not being parsed

    We currently have a customer using one of our products with WebLogic 8.1. This product is deployed via a war file and when accessing the application, nothing included via a jsp:include shows up. When viewing the source output via a browser the <jsp:include... tags exist in the actual HTML. It is aparent they have never been parsed. Other jsp tags appear to be working though.
              The application works fine on Oracle 9iAS, Tomcat 4.x and 5.x and I believe there are several users with IBM Web Sphere using it with no problems. This is the first customer using this particular server and the first time with this behavior. Any ideas as to what the problem may be? I have downloaded and installed WebLogic 8.1 and can reproduce the error at will.

    Argg. Thats an ugly bug.. It has to do with which attribute of the include
              directive appears first.
              So the following doesnt seem to work
              <jsp:include flush="true" page="/lib/axscripts.jsp" />
              but if you change the 'page' atribute to appear first, it does.
              <jsp:include page="/lib/axscripts.jsp" flush="true"/>
              That said please contact [email protected] and request a patch for CR189880
              --Nagesh
              "Andrw Hale" <[email protected]> wrote in message
              news:9704331.1090501692204.JavaMail.root@jserv5...
              > Well, I have my main page that includes a header using the <@% include
              file=... %>. This gets included fine. The file it includes I have reduced
              to:
              > <jsp:useBean id="webBean" class="webBean" scope="session"/>
              > <jsp:include flush="true" page="/lib/axscripts.jsp" />
              > <jsp:include flush="true" page="/menus/document-menu.jsp"/>
              > <jsp:include flush="true" page="/menus/device-menu.jsp"/>
              > <jsp:include flush="true" page="/menus/admin-menu.jsp"/>
              > <jsp:include flush="true" page="/menus/help-menu.jsp"/>
              > <jsp:include flush="true" page="/menus/logout-menu.jsp"/>
              >           >
              > The jsp:useBean tag is parsed and used correctly while all of the
              jsp:includes remain in the body of the HTML.
              

  • ** Embeding BPC functions inside VBA Code **

    Hi all,
    I am wokring in a BPC application which is a bit more customized and has some complexities.
    Basically It's a client-server app, with BPC in backend and Excel as Front end.
    Does anyone know whether it's possible to embed BPC functions inside VBA code?
    For example, If I want  to store a the value of a property of a dimension member into a VBA variable, is it possible?.
    Inside VBA,
    MyVar = EVPRO("MY_APPS","MEMBER-X","ACTIVE")   won't work until VBA is told about the details of EVPRO.
    Any idea whether this could work using some special techniques that tell VBA the details about EVPRO and other BPC
    functions?
    Thanks
    DipM

    Hi,
    I am not sure if that is possible. Although you can try this below work around.
    sheets(1).cells(1,1).value="=  EVPRO(""MY_APPS"",""MEMBER-X"",""ACTIVE"") "
    MyVar=sheets(1).cells(1,1).value
    Although this is just a workaround but works smoothly. Hope this is of some use to you.
    Regards,
    Badrish

  • Calling a VB Script and Matlab code from LabVIEW GUI.

    Hi,
    Can anyone help me out in Calling a VB Script and Matlab code from LabVIEW GUI? GUI will be developed in Labview and currently we have some scripts written in VB and Matlab and we need to incorporate the same through LabVIEW. Can anyone let me know how this can be implemented? 
    Regards,
    Sharmash

    For VBScript you can call the Windows Scripting Host application using the System Exec function, or you can use IScriptControl, which is an ActiveX control. Be aware that with the IScriptControl there's a small bug. You can read more about it in this post.
    For Matlab, there's a Matlab node that you can use. You can either copy and past your Matlab script in the node, or just write a function call statement. The node simply calls Matlab. Or, you can do as suggested and use the MathScript node, which is basically an alternative to Matlab. The MatchScript node doesn't support everything that Matlab does, so you will need to check it against your script.
    Or, you can do as suggested, and rewrite it all in LabVIEW, unless you can't because these scripts are used by other applications.

  • Invoking a bash shell script from Java code

    Hi All
    I am trying to invoke a Bash shell script using java code. The arguments required are "source wmGenPatch <source dir> <destination dir> no_reverse.
    in the code I have specified the arguments considering the cannonical paths of the files as the code may run on Unix or windows platform.
    I am getting a error while invoking Runtime.getRuntime().exec(args). The error is as follows :
    "The Error Occurred is: CreateProcess: source D:\Package4.0\workspace\DiffEngineScripts\v4a02\wmGenPatch D:\Package4.0\workspace\fromImageFilesDir\ D:\Package4.0\workspace\toImageFilesDir\ no_reverse error=2"
    It seems that error=2 indicates that the 'file not found' exception. But i can see the directories referred to in the error at place in the workspace.
    Kindly advice.
    Thanks in advance.

    Hi All
    I am pretty new to invoking bash shell scripts from java and not sure if i am progressing in right direction.
    The piece of code tried by me is as follows
    try {
                   currentDir = f.getCanonicalPath();
              } catch (IOException e) {
              if (currentDir.contains("/")) {
                   separator = "/";
              } else {
                   separator = "\\";
              String args[] = new String[7];
              args[0] = "/bin/sh";
              args[1] = "-c";
              args[2] = "source";
              args[3] = currentDir + separator + "DiffEngineScripts" + separator
                        + "v4a02" + separator + "wmGenPatch";
              args[4] = sourceFileAdd;
              args[5] = destFileAdd;
              if (isReverseDeltaRequired) {
                   args[6] = "reverse";
              } else {
                   args[6] = "no_reverse";
              try {
                   Process xyz = Runtime.getRuntime().exec(args);                              
                   InputStream result = xyz.getInputStream();
                   InputStreamReader isr = new InputStreamReader(result);
                   BufferedReader br = new BufferedReader(isr);
                   String line = null;
                   while ( (line = br.readLine()) != null)
                        System.out.println(line);
                   int exitVal = xyz.waitFor();
                   System.out.println("Leaving Testrun.java");
              } catch (Throwable t) {
                   t.printStackTrace();               
    and on running the same i am getting Java.io.IOException with the stack trace
    java.io.IOException: CreateProcess: \bin\sh -c source D:\Package4.0\workspace\DiffEngineScripts\v4a02\wmGenPatch D:\Package4.0\workspace\fromImageFilesDir\ D:\Package4.0\workspace\toImageFilesDir\ no_reverse error=3
    kindly advice
    Thanks in advance

Maybe you are looking for

  • Error calling Report and unable to bind Report Server

    Hi, I use Oracle Database 10g with Oracle Developer 10.1.2, in Windows 2000. I don't have nor use Oracle Application Server though. I tried to call a report from a Form, using Run_Report_Object. But the following error appeared. Error FRM-41213 Unabl

  • Writing to file(using PrintWrier)

    Im trying to do a simple program that will write system information into a file for data basing. But the problem is it creates the file but does not write anything ive used other methods. But they would not let me write to a new line in the .dat file

  • Ipod Nano 2Gb Not Recognized

    Hi. Today I bought a Second Generation iPod nano 2gb. I've downloaded iTunes and connected the iPod via USB 2.0. All my usb ports are on and they don't turn off. When I plug in the iPod, it charges, but does not show up in iTunes or under My Computer

  • Foreign Characters in Windows Vista AutoPlay Dialog Box

    I have an iPhone 3G, using Vista. Upgraded to iTunes 8 (really like the changes so far), and also upgraded to 2.1 (so far so good), but have found a strange behavior when I connect my iPhone to my computer. I have searched the forums and have not fou

  • XLR old reports not working with UDF from Marketing docs

    Hi, We are using SAP Business One 2005 A (6.80.318)  SP: 01  PL: 16 and the following version of XLR. XLR Version 6.80.367 (under about XLR) or 6.80.01.26 (under Add-ons manager). We have just gone from 6.80.01.25 to 6.80.01.26 version of XLR and hav