How servlet can execute a command?

Hi
I need help on following:
1- How Servlet can execute a command?
2- I that possible a servlet instantiates an applet or frame?
Would apreciate any command(prefered sample code) on this.
Thanks...Ali

I'm not quite sure what you mean by an applet based application either... . but as I mentioned in the previous post, you could send such a page back to the client that contains an applet tag; which will subsequently display an applet on the client machiene.... and applets can comunicate to any and all servlets residing on the machiene from where they were downloaded with out any problem....
Have a look into Http-tunneling....
hope this helps
Regards
Omer

Similar Messages

  • How Forms can execute operating system files

    How can we create a button which when pressed can execute an exe file from the operating system....
    Please help me soon

    That's very simple.
    Check the host built-in.
    You may have something like the following:
    PROCEDURE run_rep (x_file in varchar2) IS
    -- runs a report not using run_product
    -- thus not opening reports background engine
    cmdstr varchar2(200);
    the_username varchar2(20);
    the_password varchar2(20);
    the_connect varchar2(20);
    pl_id paramlist;
    begin
    the_username := Get_Application_Property(USERNAME);
    the_password := Get_Application_Property(PASSWORD);
    the_connect := Get_Application_Property(CONNECT_STRING);
    cmdstr:='R30RUN32.EXE module='| |
    replace(x_file, '.rep', '')| |'.rep userid='| |
    the_username| |'/'| |the_password| |'@'| |the_connect| |' usesdi=yes';
    host (cmdstr);
    END;
    This is something that really works.
    In like manner you may run any OS command.
    If you wish the command not to display anything on screen, just do:
    host(cmdstr, no_screen);
    RTM first.
    Best of luck,
    BD

  • How i can execute the sql query in java code

    I already have sql query in jave plateform i need to execute this code how i can do that. i have unix env and with oracle database. should i just run this query in my sqlplus. this file has extention .java. thanks

    you can create a project in JDeveloper add the java file to it, add the Oracle JDBC library to the project properties and then hit the run button.

  • How does one execute unix commands from within an applet?

    Greetings Folks,
    I've written a simple java applet that runs a unix command and then displays some information. The applet compiles fine, and runs perfectly from the command line on my unix system.
    However, when I point a browser at the applet from my desktop PC I get the following error as taken from the java console:
    Exception in thread "AWT-EventQueue-2" java.security.AccessControlException: access denied (java.io.FilePermission <<ALL FILES>> execute)
    This is of course the first line in a long line of error messages. It appears that I am not able to execute a command on the unix system through my applet. I know the problem is with trying to execute a unix command since commenting it causes no error in the web browser. This is the command I'm using in java to execute the unix command:
    p = Runtime.getRuntime().exec("ps");
    Here's the html file on the unix system:
    <html>
    <head></head>
    <body>
    <appletcode=G.class height="250" width="400">
    Your browser does not support the applet tag.
    </applet>
    </body>
    </html>
    I won't list the java code since it is compiling and working on the command line. But, if you want to see it I'll provide it.
    I've done quite a bit of research on this and it seems that a great number of people have similar problems reading or executing files through java. I have yet to find a solution to this problem.
    Here are some details about my setup:
    Server:
    HP9000 running HP/UX 11.23
    Apache Web Server 2.0.35
    Java 1.5
    Desktop PC:
    Win2K Pro
    Internet Explorer 6
    Java 1.6
    If you have a solution I would be very grateful! This problem is keeping me from writing my application!
    thanks!
    kev

    Multi-posted.
    Already answered here http://forum.java.sun.com/thread.jspa?threadID=5225314&messageID=9916327#9916327
    Please don't multipost again!

  • How I can execute a user logout script in mountain lion?

    I've read that logouthook have been deprecated but I can't find how execute a logout script without this method.
    Anyone may help me?
    Regards
    Alessandro

    Hello baltwo,
    I've read these article yesterday but the first one is about the LoginHook that Apple, in the second article, says that are deprecated.
    The second article say to use launchd instead LoginHook and LogoutHook.
    I've tried to do this but launchd works (I think...) only to launch a login script with the option RunAtLoad.
    Nothing is specified with regard to the logout script.
    PS.
    Launchd with login script work only with restart but not with a shutdown and a power-on ... I'm investigating this behavior!!
    I'm sorry for my poor english.

  • HOW SERVLET CAN PING EJB SERVER

    Hello,I am making servlet that should ping the server after every 30 secondes,so
    I am interrested in how to configure web.xml,the general configuaration.Or maybe
    a small example.If any server configuation have to be done for the pinging. thanks

    I don't understand your requirements. servlets are server-side objects
    so presumably you're pinging some other server. If you want to do
    something every 30 seconds, I would use a timer service.
    -- Rob
    zou wrote:
    Hello,I am making servlet that should ping the server after every 30 secondes,so
    I am interrested in how to configure web.xml,the general configuaration.Or maybe
    a small example.If any server configuation have to be done for the pinging. thanks

  • Semi-transparent box that can execute php commands?

    I am trying to find out if it is possible to a) create a semi transparent box in flash, b) motion tween that box into place, c) subsequently use it to run forms and PHP scripts (connect to a MySQL instance, ect).
    I know that an exact answer to c) will be long and complex, so a simple (general) yes or no will suffice... but if someone could point me in more detailed direction with a) and b), I would greatly apreciate it!
    Any responses are very much apreciated!!! If you need to see the actual project I'm working on, or if I need to clarify my questions, please let me know.

    a) yes
    b) yes
    c) yes
    Instead of long and complex, how about we make it fun and easy.
    http://www.gotoandlearn.com/play?id=50
    http://www.gotoandlearn.com/play?id=20

  • How to start linux box. How i can access its command line prompt

    [root@rxxx ~]# /sbin/shutdown -h now
    Broadcast message from root (pts/1) (Mon Feb 12 13:18:44 2007):
    The system is going down for system halt NOW!
    [root@rxxx ~]#

    If you want to reboot your system don't use -h (halt)
    when system is halt, the only option you have is turn off system and turn back on.
    halt
    Set the computer to a mode that enables a user to turn off the computer.use
    shutdown -r Now

  • How can I execute a command inside of a VM client from the VM host?

    Hi!
    I'm working on a set of scripts to automate MOC classroom installations using MDT and PowerShell. Sofar I've been able to automate everything except for the Rearm needed within the VM Clients. Is there any command (preferably PowerShell) that I can Launch
    on the VM host with which I can execute a command within the VM Client?
    Regards,
    Gerrit Deike
    If you think your to small to make a differnce, try going to bed with a mosquito in the room...

    If you wanted the pings to run in parallel, you could have this applet configure another applet to do the pinging, then remove it on the last run.  This will require an amount of programmatic logic, though.  If you wanted to keep things a bit simpler, add another applet that runs at 22:00 that configures a watchdog pinging applet, then a third applet that runs at 22:10 that removes the pinging applet.
    When it comes to embedded quotes when you configure your nested pinging applet, you'll need to use $q to stand for the embedded quotes.  You'll also need to configure:
    event manager environment q "

  • Can't execute windows command in servlet with JDK1.5 and tomcat 5

    Hi all,
    I have a web application which uses a servlet to execute windows commands, such as "mkdir", "mv", and "rmdir". In my servlet, I use java Runtime() class to implement the execution.
    Under jsdk1.4 and tomcat 4, it is fine for the servlet to execute those command. But uncer jdk1.5 and tomcat 5, it gives the following error:
    error to execute a command: java.io.IOException: CreateProcess: mkdir c:\m7q28 error=2
    java.io.IOException: CreateProcess: mkdir c:\m7q28 error=2
    Please help me if you have any idea. Thanks.

    And be sure to read this:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • How execute a command on the Console from our prgm

    can any body let me know how do we execute a command on the Console from our prgm . . on a windows platform ..
    eg. a simple commant like "dir" or "cls" . . or whatever . . .
    i heard that it can be done by calling the native methods . . but how is that done???

    thankx for the quick reply . .
    for instance i wanna take a file from my local machine . .
    a c++ source code . . (myfile.cpp)
    i want to execute that on the prompt using c:\> tcc myfile.cpp
    and all these i mean reading the file from the HDD and giving it to the console and getting the output everything should be done by my prgm . .
    so basically the command which i usually run on the prompt i should be able to pass that command from my java prgm to the console and get that thing executed . .
    i hope i am clear now .. .

  • How i can open a new command prompt from one java from

    hi
    can any one help me that how i can open a command prompt by using the java program file .
    regards,
    ukbasak

    http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Runtime.html#exec(java.lang.String)
    and several overloads.
    Also
    http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ProcessBuilder.html

  • Can we execute DOS Commands from a Java Application

    I just want to know whether we can execute DOS Commands from a Java Application.
    Thanks.

    hi,
    try this:
    Runtime.getRuntime().exec("cmd /c start abc.bat");
    andi

  • Execute Shell command in Panel SDK Mac

    Hi,
    I´d like to execute the following task with a Panel:
    • render the active sequence
    • when finished send the output video file to another application using Apple Script
    The Panel SDK Examples are a great start. So the missing part is, how can I send a shell command that executes an AppleScript?
    In the ExtendScript Toolkit I found a function that looks promising. But executing this script only pops up an alert window saying "failed". Here´s the code:
    var test = UIAutomationSupport.helper.executeConsoleCommand("ls -l");
    alert(test);
    So does Premiere has an equivalent function like system.callSystem() in After Effects?
    Thanks,
    Thomas

    Bruce, thanks for your support!
    For those who are interested what bbb_999 refers to, here is how you can execute a shell command (in the example I use "osascript" to launch an AppleScript file):
    In your html file you simply write these simple lines of code
    <script type="text/javascript">
        function executeShellCommand(){
              var result = window.cep.process.createProcess('/usr/bin/osascript','/Users/myUserName/Desktop/test.scp t');
              alert(result.data+" "+result.err);
    </script>
    The first argument of createProcess() is the path to the shell tool.
    That´s all. Hope this helps others.
    Thomas

  • Executing OS-Command

    Hi experts,
    I would like to execute the following OS statement, for moving files.
    "mv /dir/file /dir/archive/file"
    The command runs perfect via telnet on the server.
    But when I execute the same via SM69 or program code "call system id command..." I always get the following error message:
    "Can't exec external program (No sucha file or directory). External program terminated with exit code 1"
    Our OS is HP-UX.
    Any ideas, how I can execute the statement on the server via sap?
    thx in advance

    Hello Volker,
    thank you for your fast answer.
    However I've solved the problem on my own.
    My mistake was, that I've entered (for testing via SM69) the whole statement into "Operating system command".
    So I entered: "mv <old path> <new path>".
    But in this field you only have to enter the command, thus "mv".
    And the <old path> and <new path> you have to enter into the field "Parameters for os".
    BTW: instead of LS -L you have to use LL
    Kind regards

Maybe you are looking for

  • Using Airport express as wireless reciver is this possible?

    I have a power mac g4 and it does not have a wireless card. I have a wireless network in the house and i was wondering if it was possible to use the airport express to connect to the wireless network and give my g4 intent access. Thanks Mark

  • Database Link for Entire DB

    Hi Friends, I can create database link from DEV instance to PROD instance using: === create database link db_link1 connect to HR identified by HR using 'prod'; === Question 1 My problem is that when HR changes it password my link gets disabled. Is th

  • Invoice load using main vendor and alternate payeeu0085Issues ????

    Hello all, I have a question regarding alternate payee in the vendor master.  We have a vendor A which has an alternate payee in it B . So when we load an invoice with vendor A and run payment run it picks up vendor B as recipient. But when we load a

  • Validate xml fails using XInclude.

    I tried to use the XInclude syntax in a very simple way in order to make my xml more modular. Here the example : <?xml version='1.0' encoding='windows-1252'?> <frame name="pippo" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xsd="http://www.w3.org

  • How can I turn ALL notifications off at once?

    Before upgrading to iOS5, I could turn off ALL notifications with ONE swipe and all back on with one swipe... I do that when I go to sleep, because otherwise, my phone lighting up over & over wakes me up somestimes... and I don't want to be awakened