How to invoke a Batch file in a remote system from JSP

Hi,
Please help me. Its urgent. Here is the problem.
I have Tomcat Server installed in machine A and I have .bat or a perl script file in an another system called Machine B in the same LAN. I want to invoke the .bat file or shell script in the machine B from my JSP running in Tomcat in Machine A. Help is appreciated.

The first thing to be done is that the bat / perl script file should be shared at the remote machine. Means that could be accessed by giving any url.
After that read that file in jsp by opening file input stream for that file and create/save the file by same name at the machine from where the jsp is running by creating file output stream.
Once the file gets created at the machine, execute that by Runtime.exec method. Don't forget to close the streams just after the reading/writting.

Similar Messages

  • How to call an EXE file on a remote system from SAP system?

    Hi Friends,
    I want to execute an EXE file existing on the remote system from SAP system. Could some one give me an idea of how to execute that?
    Thanx in advance,
    Ram

    Hi Ram,
    Try this
    SXPG_COMMAND_EXECUTE
    Reward if this helps,
    Satish

  • How to execute a batch file on different remote server using TFS Build

    I have a build server and have 2 web servers. I am deploying using TFS Builds. Now, I have a requirement to execute a batch file which is kept on these 2 web servers. i.e. C:\MyBatch\CreateMe.bat
    After my build is successful, I need to execute this batch from the build server.
    Note, I cannot make any shared folder.

    Hi Sameer, 
    Thanks for your post.
    What’s the version of your TFS?
    How do you deploy solution using TFS Build, run MSBuild deploy command or using Release Management?
    That C:\MyBatch\CreateMe.bat file stay on your two web server machines separately? 
    If you want execute this bat file on your two web server machines separately using build process template, you need configure your web server machine as build agent, then add the InvokeProcess activity in build process template to run the bat file on build
    agent machine after build, please refer to Hari’s answer reply in this post:
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/b8bcb19f-1296-441c-8356-e701b949445a/tfs-2010-how-to-execute-a-batch-file-after-build?forum=tfsbuild.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to create a Batch file for java application  ?

    HI,
    How to create a Batch file for java application ?
    And whats the use of creating batch file ?
    Thanks in advance

    [http://static.springsource.org/spring-batch/]
    Assuming you want to develop a batch application rather than actually just create a .bat file ..

  • HOw to create a Batch file for java application and whats the use of this ?

    HI,
    How to create a Batch file for java application ?
    And whats the use of creating batch file ?
    Thanks in advance

    First of all, you're OT.
    Second, you can find this everywhere in the net.
    If you got a manifest declaring main class (an classpath if needed), just create a file named whatever.bat, within same directory of jar file, containing:
    javaw -jar ./WhateverTheNameOfYourJarIs.jar %*By the way, assuming a Windows OS, you can just double click the jar file (no batch is needed).
    Otherwise use:
    javaw -cp listOfJarsAndDirectoriesSeparedBySemiColon country/company/application/package/className %*Where 'country/company/application/package/' just stands for a package path using '/' as separator instead of '.'
    Don't specify the .class extension.
    Javaw only works on Windows (you asked for batch, I assumed .BAT, no .sh), in Linux please use java.exe (path may be needed, Windows doesn't need it 'cause java's executables are copied to system32 folder in order to be always available, see PATH environment variable if you don't know what I'm talking about) and use ':' as classpath (cp) separator.
    The '%***' tail is there in order to pass all parameters, it only works on Windows, refer to your shell docs for other OSs (something like $* may work).
    This way you have a command you can call to launch your code (instead of opening NetBeans just to see your app working). You could schedule tasks on it or just call it in any command prompt (hope you know what it is 'cause there have been people in this very same forum with no clue about it, if not just hold the 'Windows button' and press 'R', then type 'cmd' and run it).
    Finally add dukes and give 'hem away.
    Bye.

  • How to run a batch file as windows Nt service

    Hi friends
    I want to know how to run a batch file as windows NT service.
    I got some information in the following link
    http://support.microsoft.com/kb/q243486/
    I tried it but i want to know what we need to include in Autoexnt.bat
    And one thing i need Instexnt.exe file. I cannot find tht file.
    Please search tht file and send me tht file or else send the link in which this file is present
    Please give me reply fast.its very urgent.
    Thanks in advance.

    Hi,
    My aim is to run a MS-DOS Batch file, that I created to run a Java Prgram.
    I need to call the Batch File from the Oracle Procedure, Also I may need to change the content of the Batch File (Argument to the Java JAR File ).
    I can keep the JAR FIle either in the Oracle Server or in the Application Server.
    The Java program is to convert XML Format FIle to PDF and MS Word format.
    Oracle Version : 10g 2.0.1.0.
    Thanks in advance
    Rizly

  • How to run a batch file

    Hi,
    How to run a batch file from Oracle. Is it possible directly from PLSQl, or should I write the java code.
    Oracle Version: 10g 2.0.1.0.
    Thanks in advance
    Rizly

    Hi,
    My aim is to run a MS-DOS Batch file, that I created to run a Java Prgram.
    I need to call the Batch File from the Oracle Procedure, Also I may need to change the content of the Batch File (Argument to the Java JAR File ).
    I can keep the JAR FIle either in the Oracle Server or in the Application Server.
    The Java program is to convert XML Format FIle to PDF and MS Word format.
    Oracle Version : 10g 2.0.1.0.
    Thanks in advance
    Rizly

  • How to run the batch files

    Hi Experts,
    I am trying to implement automatic cache purging every day at specified time and i created txt file with SApurge All cache() and created bat file with nqcmd -q Analyticsweb -u username -p password -s (txt file location).
    Now i want to run this bat file daily at specified time with out executing manually may i know how to run the batch file at specified time .
    Thanks,

    There is task type as command in workflow manager if you want you can go for that during the load
    nqcmd -d "AnalyticsWeb" -u Administrator -p Administrator -s "D:\PowerCenter8.1.1\server\infa_shared\SrcFiles\1_BIPurgeCache.txt"
    Check these urls
    http://docs.oracle.com/cd/E12103_01/books/AnySched/AnySched_Scripts3.html
    http://deliverbi.blogspot.com/2011/12/purge-all-cache-from-dashboard.html

  • How to run a batch file clicking a button?

    Hi All,
    Can you tell me anyone how to run a batch file clicking a button? And also the progress bar showing the progress.
    Arif

    As said: write the insert statement like above (of course replace the databaselink, column and table names with your own) in a stored procedure and call this procedure in the WHEN-BUTTON-PRESSED Trigger.
    As for the progress bar: how many records are you processing and how is the network connection between your database server? As above method is rather fast it might take just a few seconds and you could spare you the progress bar (this might be a little tricky to implement).
    cheers

  • How to delete the temporary files when we log out from ESS

    Hello expert,
    In my company we are running ESS using ITS server, do you know how to delete the temporary files when we log out from ESS?
    Thanks.

    The temporary files used by ESS. For example paystub pdf file.

  • How can I send scanned files, which are documents changed from doc to PDF, as documents that can be edited if the recipient doesn't have Adobe capabilities?

    How can I send scanned files, which are documents changed from doc to PDF, as documents that can be edited if the recipient doesn't have Adobe capabilities?

    Hi flaviusjack,
    If you still have the .doc files, it might be best to send those to your recipients so they can be edited. Otherwise, you can use ExportPDF to convert the PDF files back to .doc format. But, again, that step would be unnecessary if you have the .doc files.
    Best,
    Sara

  • How to make a remote panel file dialog open remote directory from any computer

    Hello to everybody. I am using Labview 6.1 and I would like to know how to make a remote panel file dialog open remote directory from any computer (Not only from a specific computer. If I open the file with a specific computer, I have to conect the path of the remote machine, but if I don´t know which remote computer is going to run the aplication, how can I do it?)?

    Hi!
    first you have to know progammatically the name of the remote pc connected to your server: this is a problem!
    I did not find a straigth way, LV 6.1 doesn't allow much progammatic control on the remote panel connection feature, but I'm confident that in the next LV version this will be improved!
    The point is that the Remote Panel Connection Manager (from the Tools menu) has all the informations about the connection: client name, server vi and whatever.
    This application is embedded in the \PROJECT\REMOTEPANEL.LLB and consists of a set of password protected vis.
    So here's the trick: use VIServer to grab data from the rpcm Get Server Data.vi when the Remote Panel Connection Manager is in run mode. By this you get all the informations (not only client name)o
    f the remote panel connection. See my example.
    By the way use client machine name to build the file dialog function input path.
    If anybody has an alternative method it would be more than appreciated to share it.
    Good luck,
    Alberto Locatelli
    Attachments:
    get_remote_machine_data.vi ‏151 KB

  • How do I recover a file of images I removed from LR 4.3 that is not found in my desktop recycle bin?

    How do I recover a file of images I removed from LR 4.3 that is not found in my desktop recycle bin?

    I would try the following, in order
    Have your operating system search your entire hard disk(s)
    If that doesn't find the files, restore from backup
    If you don't have backups then perhaps you should consider making backups of both your catalog file and your photos from now on
    Locate, download and install and run an "undelete utility" (freeware versions are available) -- if you are going to do this, do it immediately, do not perform other tasks on your comptuer

  • How to run TestStand script on a remote system from a TestStand script?

    I would like to run a test stand script on a remote system from within another TestStand script. How can this be done?

    Hi EyaID,
    I believe you are looking for the Remote Sequence Call feature. Look at this last paragraph in this knowledge base and section 5-18 of the TestStand Reference Manual for more help:
    How can I Call an External Sequence with Parameters when the Sequence is Located on Another Computer...
    Regards,

  • How do you install a driver onto a current system from a live cd?

    I just installed Arch on my laptop, but it seems that it doesn't install the Ethernet drivers and they don't appear to be on the live CD.  How might I install the drivers?
    Thanks!

    Yes wrote:How do you install a driver onto a current system from a live cd?
    Yes wrote:
    I just installed Arch on my laptop, but it seems that it doesn't install the Ethernet drivers and they don't appear to be on the live CD.  How might I install the drivers?
    Thanks!
    your post title and the message within seem to contradict themselves.
    More information from you might be helpful as in  what packages did you install during the installation process? Did you have network connection during the install? Are there any errors that you get when booting.
    Last edited by Inxsible (2010-06-16 23:50:34)

Maybe you are looking for

  • Upgrading to Edge and keeping old phones...

    I have 2 phones that are under contract and paid in full, 23 months of the 24  months right now. I'm interested in switching to EDGE, but I learned they want me to give them my phones that are far paid off. Currently, we've paid around 2200$ towards

  • 4K footage to DVD: what are the best settings for exporting in Premiere Pro CC v7.2.2?

    Hello everyone! I am editing a big bunch of short 4K clips (XAVC in MP4) which will then go onto DVDs. The idea is to get as many of those clips on a DVD as possible. Using Premiere Pro 7.2.2 on Windows 8. What I would like to know is whether I'm act

  • Hard drive restore- issue

    I had to restore my hard drive (mac) and reloaded from a Backup (yeah!) but Adobe requires that I Uninstall(done), run a Cleanup (done) and reinstall from a new downloaded DMG file.  (why can't this be easier?) Upon trying to start the install I get

  • How to distinguish a text in acrobat professional 8.0?

    Hi all, I am new to this forum. First, let me explain my problem: I have a acrobat file which looks like as shown above. There is some text which corresponds to each number. I am interested to extract the numbers which have some particular text( ex:N

  • Additional validation for one of the fields in down payment request

    Hi All ,   I have a requirement for doing some additional validation for one of the fields in down payment request (F-47) . I need to validate a field u2018Assignmentu2019 in the down payment request . Here, assignment field is mandatory and user has