Run a .sh file via a web application

Hi,
How can I run a .sh file via a web application? I want to start and stop a service in linux via a web app.

a service in linux In Unix (including Linux) they are called rather daemons.
Anyway, usually appropriate (root) privileges are needed to start/stop a dameon and a web application should not run as root.
So be prepared that ome "sudo" magic might be needed.

Similar Messages

  • Visual Studio 2013. Viewing a PDF file via the Web Browser control in Windows 8.1

    I am writing a Windows Forms application in which I need to view PDF files via the Web Browser control. When the control is given the Navigate() command, Windows takes over and asks which program I want to open the file with. All was fine with VS 2010 and
    XP. I have un-installed "PDF Complete", which was the default PDF viewer, but I now get asked for an alternative.
    Thanks in advance.
    Mike Saunders

    Hi Mike,
    It seems that we could use Internet Explorer to open a local .PDF file if it has the Adobe Reader. I doubt that the web control would be related to it. Like the MVP's suggset in the following thread, maybe it would be related
    to certain plug-in tools in your side like the adober reader.
    Reference:
    https://social.msdn.microsoft.com/Forums/en-US/a717117e-41ae-4775-9c28-d5a1042b396e/pdf-is-not-opening-in-web-browser-control-in-vbnet?forum=vbgeneral
    Best Regards,
    Jack
    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 and save a file in flex web application ?

    Hi,
          I want to create and save a file form flex web application. Is it possible ?
    I have done some googling and found that its only possible through file referece, which needs some serverside implementation be called.
    Is it not possible with file reference to create and save file directly ?
    Can any one suggest how to over come this.
    Thanks in advance.

    Alex,
    code written with the Flex Builder 3 libraries will certainly run in Flash Player 10. However, what you need is not so much the capabilities of FP10 but the library functionalities of the Flex 4 package. And I think that Flex 4 code will only run in FP10 and not 9 (but haven't tested this as at work we have not yet been permitted to upgrade, so there is not a lot of point going for Flex 4!).
    Richard

  • Can we run the batch file using simple java application

    Hello sir,
    we want to run the batch file using simple java application. i tried with some example, we run the exe files but not batch file.
    Runtime r = Runtime.getRuntime();
    r.exec("D:\\jboss\\bin\\run.bat");
    My application is server will run when we run the java appliation.
    any suggestion? plz give me the solutions

    yes you can run html file
    WEB.SHOW_DOCUMENT is a built-in that is used in Forms to call URL from a Web Form. It works much like the similar way that a link on an HTML page works and it takes two arguments, one is URL and second one is TARGET, in your case use following.
    WEB.SHOW_DOCUMENT('http://channas.iil.informatics.lk:8890/forms/frmservlet?config=abc.html', '_blank');
    Hope this will work for you
    Abbas

  • Storing output file created by web application in specific folder

    Hi Friends,
    I am creating a text file through my web Application which is on JBoss and I have to read this file in the JSP to print the out put.
    My problem is, the text file has been created in JBoss/bin, I want it to be created in my project folder.
    Can some one please guide me in specifying the path to place the file.
    Thanks in advance.
    Preeti

    I want to add one more sentence to my previous message:
    I can do this by specifying absolute path but I want to specify this path in my web.xml. which tags should I add to web.xml ?
    Thanks,
    Preeti

  • Opening a PPT file from a Web Application

    Hi,
    I want to open a PPT file from my web application.
    I have provided an hyperlink of the complete path of the file. Once the user clicks on this hyperlink the PPT shall open.
    Kindly help me out with this.
    Thanks.

    Sounds like you're done. What happens when the user clicks the link?

  • How to install a war file as a Web Application Bundle (WAB) in CQ 5.5?

    How to install a war file as a Web Application Bundle (WAB) using CQSE and embedded OSGi Felix container? OSGi R4.2 specification specified Web application bundles which allows deploying war files as WABs insie OSGi containers. How do we do this in Felix container embedded in CQ 5.5?

    i m sorry, i intentionally wanted to post it in EJB forum, mistakenly i posted it in Servlets forum, anyways, if anyone of u know the ans, plz share it with me too.
    Thanx
    Nisha

  • Can any body tell where i have to place the mdb file in the web application

    Hi
    I am doing a web application in NetBeans 5.0 and using MSAccess (*.mdb ) file as a backend, so now where i have to place this mdb file in this web application in NetBeans. and tell me the code how to connect to that mdb file.
    The mdb file name is "db.mdb" and i am using a jsp page through which a servlet will be communicated. in servlet i am not able to connect to this mdb file.
    Reply asap.
    Sasi .

    DrClap wrote:
    duffymo wrote:
    Then I'd put it in my CLASSPATH. Maybe WEB-INF/classes.I'm not sure that I like the idea of the database being inside the web application's context. When you deploy a new version of the application, wouldn't that be a problem? My answer to "Where do I place the MDB in the web application" would be "Anywhere but there".DrClap, I'm embarrassed to read this, because you're only too correct. Thanks for the correction.
    When you think about it, your advice makes a great deal more sense. Any database BUT Access would be on a separate server (e.g., Oracle, MySQL, SQL Server, etc.) Why wouldn't that be a good idea for Access, too?
    On the other hand if it's a read-only database that would be different.You're too gracious to leave me this out. I throw myself on the mercy of the court for being a dumb ass. 8)
    %

  • File separator in Web applications

    I learned that to make a web application run in both windows and unix environments file seperator needs to be taken from a system property called file.separator.
    But when i develop webapplications in windows with hardcoded file separator it still works in UNIX
    e.g <img src="/images/spacer.gif"> and even when i forward to jsp's
    it still works
    RequestDispatcher rd = request.getRequestDispatcher("/jsp/blah.jsp")
    Can someone explain me how we got around that
    Thanks in advance

    But when i develop webapplications in windows with hardcoded file separator
    it still works in UNIXThat's just fine? What's the requirement then? That it should not work in UNIX? And what exactly should not work? Web paths or absolute filesystem paths?

  • How to use multiple configuration files in a web Application

    Hi,
    I am using JDev 11 TP3,JBoss4.2.1,Trindad 1.2.4.
    In my project I have to use a set of (Login) pages over several other projects.
    So I stored those pages (& backing beans) at an external location.
    Now while editing the deployment profile of the web application I included the login pages from external location using "Contributors".
    This way I was able to bring all the resources in the war. But the Faces-config.xml which contains the managed-bean registration of the login pages does not get included.
    1. Either I could change the name of the external faces-config and register it in the current project by includeing it. OR
    2. I could mention the managed-bean info in the current project's faces-config.
    I want to use option 1.
    How may I do it??

    Hi,
    if you package the managed beans in JAR files and add the faces-config.xml in the META-INF directory of it then it automatically registers at runtime
    Frank

  • Running a batch file on  a web server

    hi,
    i am facing a problem regarding running a batch file(with a java command in that file) on a web server.
    i am having a batch file which is running a chatapplication (this file is having a single line -- "java ChatServer 8080")
    i want to execute this command ( file ) on my web server
    can u help me plz ( i think u can)
    thanx 4 reading my problem...
    -ashish

    thanx 4 replying
    but as i am a developer and i am developing the aplication for a client, so should i speak to the client for this or can i do this without interrupting them?
    -ashish

  • Binary file support for web application in 10.3?

    There is such paragraph in Release notes for Flash Player 10.3:
    Binary file support
    Add more power to your web application with direct byte access to binary data. Control and access data in new ways, such as adding support for new file and data types or manipulating sound data in real time to create new sound effects.
    Does anyone know what do they mean by this exactly?

    Real programmers do it in binary!! ;-)

  • How to set a root directory for file management in web application

    Is it possible to set a default root directory for file management for a web application ?
    We would upload some files and store them in the web server.
    When we write the uploaded files without any path, the files are written in the config directory into the jdeveloper embedded oc4j directory.
    When we write the uploaded with a relative path ("/somedir/filename"), the files are written in C:/somedir/filename.
    We would like that all file management with relative path into the web application refer automatically to a given root directory (for example defined in web.xml).
    Is it possible ?

    I'm using the standard upload in adf faces.
    The problem is not during upload. This is managed in a temporay directory defined in web.xml. The problem is for writing the file that was uploaded (upload give us an inputStream we have to write somewhere, eventually after unzipping).
    Here is an example of our current code.
    if (mimeType.equals("application/x-zip-compressed") |
    mimeType.equals("application/zip")) {
    File destZipFile =
    new File(rootDirectory + "/" + parametersDirectory +
    "/" + uploadedFile.getFilename());
    BufferedInputStream isZipFile =
    new BufferedInputStream(uploadedFile.getInputStream());
    FileOutputStream fosZipFile =
    new FileOutputStream(destZipFile);
    BufferedOutputStream bosZipFile =
    new BufferedOutputStream(fosZipFile, BUFFER);
    // read and write until last byte is encountered
    while ((currentByte = isZipFile.read(data, 0, BUFFER)) !=
    -1) {
    bosZipFile.write(data, 0, currentByte);
    }

  • Accessing PDF files outside the web application

    Hi,
    I have deployed a web application Tomcat / webapps/ Moto.
    The Tomcat / webapps / Moto / resource.jsp file has links
    to a pdf file located outside the Moto web app.
    The pdf file is in Tomcat / webapps / doc / BAServerConfig.pdf.
    Now, I'm unable to access this pdf from the resource.jsp page.
    Is there any way i can do this?
    I'm not supposed to move this pdf file to any location.
    Please suggest.
    Thanks in advance,
    Phani

    I havent tested, but if it doesn't work, it should give you the idea:
    <%@ page contentType="application/pdf;charset=TIS-620" %><% response.setHeader("Content-Disposition","attachment; filename="+request.getParameter("id").substring(request.getParameter("id").lastIndexOf("/")+1));
      try{
        FileInputStream fis=new FileInputStream(request.getParameter("id"));
        ByteArrayOutputStream baos=new ByteArrayOutputStream();
        byte buffer[]=new byte[1024];
        int length;
        while((length=fis.read(buffer))>=0) baos.write(buffer, 0, length);
        baos.writeTo(response.getOutputStream());
      catch(Exception e){
        throw new ServletException(e);
    %>Be aware to not to broke ... %><%..... with spaces or return characters.
    And if this work, you can convert it to a servlet and enter corresponding entries in web.xml file.
    Hope this help,
    OO

  • File Class in Web Applications

    Hallo, i am creating a web Application but i need to know the fullpath of a file. I see that in the web based application i can call that FileReference class but with this class i can only get the name of a file and not the fullname. I can do this with the File Class which is avaible in Air Applications. How can i do it with my FlashPlayer application??....
    Thanks for all
    Max

    You can't get that with FileReference on the web (Security reasons). It was
    possible to get it with an HTML form and Javascript but I am not sure Firefox 3
    is still delivering the full path. Also not sure it works in all the browsers.
    C

Maybe you are looking for

  • Has anyone had a problem with iphone 4Gs interfering with wireless routers on a desktop system?

      I'm currently having a problem with my iphone 4Gs shutting down my wireless router when it's within ten or fifteen feet of the unit.  I discovered this over the last few days thinking it was a problem with the router, it wasn't till today I realize

  • Send table data through mail in oracle 10g

    Hi , I am trying to send a mail through oracle 10g . I can send mail through utl_mail . The text that I need to send is data from a table . The table contains information about all the employees . Table name is person . If the employee is absent on a

  • Use Batch-Input function module in WebDynpro?

    Hi, is it possible to use a batch-input function module in WebDynpro? This function module is RFC enabled, and would be executed only in background mode. The purpose is to create some business document in ERP, since we only have a dialogue transactio

  • My Application logs "The description of Event ID 0 from MyApp cannot be found" event to application event log

    Hello, This is regarding the following event logged by my application (MyApp.exe) to the application event log: Log Name:      Application Source:        MyApp Date:          03/2/2015 12:00:09 PM Event ID:      0 Task Category: None Level:         E

  • Button not Reporting Score

    Hi, I have an acknowledgement button in my Captivate file that is supposed to report 100 points and a passing score to the LMS, but it is not doing so.   I have checked Advanced Properties under the Project tab, and this button is the only thing that