Is it possible to execute a ASP/CGI/PHP script thru sockets?

hi,
i was wondering whether it is possible in Java to pass data and execute ASP/CGI/PHP script on demand thru sockets (suppose a port has been specified by both sides) and how? i know this is possible thru the urlConnection, but how about sockets? these scripts could be stored in specific directories on the server.
thanks!!!

hi,
i was wondering whether it is possible in Java to pass
data and execute ASP/CGI/PHP script on demand Yes, completely it's possible!
If you need to access ASP/CGI/PHP/Servlet/JSP thru' Java program, you can refer:
http://developer.java.sun.com/developer/qow/index.jsp
[after a week: http://developer.java.sun.com/developer/qow/archive/index.html
and look for 'Can I send an HTTP request to a servlet from a normal class without having to use a browser to send the HTTP requests?']
-and that's the QOW [Question Of the Week]!
thru sockets (suppose a port has been specified by both
sides) and how? When you say, a port has been specified on both sides,
then it becomes, a NET/Socket programming and you
need to use the 'net' package for the same.
i know this is possible thru the urlConnection, 'possible' means, it's assumed that u're invoking the 'script' thru' a web-server!
And u still use 'http://...' protocol to achieve the same; and u're NOT
directly accessing the script file as "file:\\network-host\root\files\abc.jsp"
but how about sockets? these scripts
could be stored in specific directories on the
server.It's not at all possible to 'invoke' those 'scripts' directly, by
using sockets; If you know that they're existing in one
particular directory of a network system, all you can do is
you can read the file content thru' socket, but you can't
make it become 'alive' and it would not dance for u!
Because, if there is a 'script' [PHP/ASP/CGI/JSP] that is
meant for dancing, then the stage for dancing is provided
by the web-server environment which starts the appropriate
server-side process that can understand and interpret the
given script! And all we can do is asking the web-server
to pull the 'script' to the stage and dance for you! But,
the 'asking' the webserver can be done thru' browser or
a URLConnection! If what you want to do would have been
possible, then, just with FTP we could have achieved the same!
Easy Go Jolly Java!
-RK

Similar Messages

  • Execute a shell or perl script

    Is it possible to execute a unix(solaris) shell script or perl script from a stored procedure. If so, a short example would be great.
    Thanks,
    John

    External Procedure Source Code
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    void sh(char *);
    void sh( char *cmd )
    int num;
    num = system(cmd);
    Issue the following commands to compile the code and generate the shared
    object in Solaris:
    cc -G -c shell.c
    ld -r -o shell.so shell.o
    You can also use the demo_rdbms.mk makefile to build shared libraries for use in external procedures. Using this method insulates you from any Operating System specific dependencies (e.g., which flags to use
    for ld).
    For example:
    In 8.0.X,
    $ make -f demo_rdbms.mk extproc_nocallback \
    SHARED_LIBNAME=shell.so OBJS=shell.o
    In 8.1.X,
    $ make -f demo_rdbms.mk extproc_no_context \
    SHARED_LIBNAME=shell.so OBJS=shell.o
    Library Definition
    CREATE LIBRARY shell_lib is '/u11/home/lsupport/proc/shell.so';
    Note: The directory in quotes is the current of location of the library that
    was created in the steps above.
    PL/SQL Wrapper Procedure
    create or replace procedure shell(cmd IN char)
    as external
    name "sh"
    library shell_lib
    language C
    parameters (cmd string);
    Execution
    SQL> exec shell('ls');
    cli.trc exe_prba.sql prueba.mk shell.c.old
    core listener.old prueba.o shell.o
    dec2bin.c listener.ora prueba.so shell.so
    dec2bin.c.old nena.lst prueba.sql shell.sql
    dec2bin.o p.sql sal.1 shell.sql.old
    dec2bin.so pepito.lst sal.2 sqlnet.log
    dec2bin.sql prb sal.3 tnsnames.ora
    dec2bin.sql.old prb.c salida.lst tnsnames.ora.old
    envoltorio.sql prueba.c shell.c uno.sql
    PL/SQL procedure successfully completed.

  • Using Adobe Acrobat - Is it possible to execute JavaScript to report to LMS to track pdf was viewed?

    Question:  Using Adobe Acrobat - Is it possible to execute JavaScript to report to LMS to track pdf was viewed?
    What I would like to do is to create a pdf with an Acknowledgement button that when click will report (via JavaScript) to the LMS (Learning Management System) that the end user viewed/acknowledged the pdf.
    Can this be down with JavaScript in this fashion?

    Thanks, (My fault, as I should have specified this.) Due to legacy reasons I need to use ie, and so I can't use the PrintPdf firefox plugin. So from reading the rest of that thread, the best method does seem to be to get hold of a copy of acrobat, and add a Print() script in each file, and open it in a new tab.
    At least it gives me somethigin to try anyway :-)

  • Is it possible to execute a transaction by calling a irpt page?

    Hi,
    Is it possible to execute a transaction by calling a irpt page?
    If possible, is there a sample code (.irpt code) for MII 12.1?
    Thanks.

    You can use a SERVLET Tag in your irpt to execute an xacute query.
    Here is the help file from 11.5 but this works in all the versions.
    [http://help.sap.com/saphelp_xmii115/helpdata/en/Advanced_Topics/Report_Generation.htm|http://help.sap.com/saphelp_xmii115/helpdata/en/Advanced_Topics/Report_Generation.htm]

  • Possible to execute custom SQL query?

    Is it possible to execute a custom SQL query and get back a collection of
    objects with Kodo JDO? Query expression languages like JDOQL are all very
    well (I actually think JDOQL is pretty messy), but sometimes when you've
    got a complex query (and you know you're using a RDBMS) it is best
    accomplished in a SQL statement. I see Kodo has extended JDOQL, which is
    good, but developing custom extensions seems to be limited to implementing
    kodo.jdbc.query.JDBCFilterListener where you can customise the where
    clause. What I want to be able to do is to specify the entire SQL string.
    I am looking into using Kodo JDO for my organisation, and being able to
    use custom SQL is something i would expect (and something we can do with
    our current O/R mapping product (TopLink)).
    Regards,
    Alex

    Patrick Linskey wrote:
    On Tue, 30 Sep 2003 10:57:13 +0000, Alex wrote:
    being able to use custom SQL is something i would expect
    We absolutely agree. Take a look at the samples/customSQL example in the
    Kodo distribution.
    -Patrick
    Patrick Linskey
    SolarMetric Inc.Hi Patrick,
    I have downloaded kodo-jdo-3.0.0RC1 for windows for evaluation, but there
    is no samples/customSQL directory.
    Alex.

  • Is it possible to execute OBIEE 11g (11.1.1.5.0) Agents externally?

    Hi all,
    Is it possible to execute OBIEE 11g (11.1.1.5.0) Agents externally i.e. using a dabase or shell script?
    I have created an agent and scheduled it to execute a dashboard. But I would like to execute this agent once dataloading is completed, not at fixed hour.
    Thanks in advance.

    Hi,
    You can execute OBIEE 11g agents externally via ODI 11g:
    "...2. Use BI EE Web Services and call ExecuteIbotNow method in the iBotService – This method will be called directly from ODI 11g..."
    http://www.rittmanmead.com/2012/01/bi-ee-11-1-1-5-calling-bi-ee-11g-agents-through-oracle-data-integrator-11g/
    and with command saschinvoke :
    http://docs.oracle.com/cd/E12096_01/books/AnySched/AnySched_JobMgrCfg14.html
    I hop those are helpful enough...
    KR,
    Roman

  • Is possible to execute the same executable vi more than 1 time (like notepad, for example)?

    I have a Labview executable file that use serial ports to communicate with other devices. I need to execute the same "file.exe" more than 1 time, to control different devices simultaneously. When I double click on an executable been executed (from windows explorer), the file under execution comes to front. Is possible to execute the same file more than 1 time (like notepad, for example)?

    Not the answer you are looking for I know..but still: Copying the application to another location is one possibility...if it has a different path it will execute separately.
    (OR - build control of multiple devices into one and the same application... If you do not want to redesign the code to handle multiple instruments in the same VIs, you could clone the VIs within the same application...)
    MTO

  • Is it possible to execute OS level commands through Oracle APEX?

    Hi,
    I would like to know if it is possible to execute OS level commands, say executing any command in command prompt using Oracle APEX.
    Thanks!

    Welcome to Oracle Forums!
    Please acquaint yourself with the FAQ and forum etiquette if you haven't already done so.
    Always state
    <ul>
    <li>Apex Version</li>
    <li>DB Version and edition</li>
    <li>Web server used.I.e. EPG, OHS, ApexListner Standalone or with J2EE container</li>
    <li>When asking about forms always state tabular form if it is a tabular form</li>
    <li>When asking about reports always state Classic / IR</li>
    <li>Always post code snippets enclosed in a pair of &#123;code&#125; tags as explained in FAQ</li>
    </ul>
    I would like to know if it is possible to execute OS level commands, say executing any command in command prompt using Oracle APEX.If by OS you are referring to the client side, then NO.
    Cheers,

  • Is it possible to execute SAPGUI scripts from java program?

    Hi everyone..
         I need to develop an java applications that executes the SAPGUI script or any technique that execute set of transaction as client.
         Is it possible to execute SAPGUI scripts from java program? if so, how it can be achieved? is there any other technique to achieve above mention scenario?.
         it will be more helpful, if docs related to that are shared..
         Thanks in advance

    Oh, bummer. Would be much more convenient if I could just use iTunes for everything. Can't stand WMP. I wonder if WinAmp might be a good compromise?
    Thanks for this answer . . .
    Sharon

  • Is it possible to execute a program under a generic userid?

    Hi,
    I created a program that calls transaction SPAD and adds/deletes printers from SAP (via BDC calls).  We want the help desk to execute this new program when adding/deleting printers from SAP (instead of using SPAD). 
    Since we don't want to give the users access to transaction SPAD, would be possible to execute this new program under a generic ID that would have write-access in SPAD.
    Thanks in advance,
    Jen

    Might be possible via RFC. Try creating an RFC-enabled wrapper function module around your SPAD call, maintain an RFC connection to the same box with a technical user and password maintained, call the function in your program with addition STARTING NEW TASK (see ABAP help).
    Make sure the technical user has authorization only for SPAD and related as well as RFC calls to the function group where your function module resides.
    Thomas
    P.S. Marcin, authorization for tcode SPAD will not be enough, there is plenty of auth checks inside that transaction for the S_ADMI_FCD object.

  • Is it possible to execute same eCATT  script in different SAP versions

    is it possible to execute same eCATT  script in different SAP versions?
    Regards,
    Sunil sankar B.
    [email protected]

    Yes. In the ecatt script you have the option under ATTRIBUTES --> VERISONING DATA you can restrict it to different software components and different releases.

  • Is it possible to execute simple class

    Sir,
    Is it possible to execute a simple program written in java in
    jdeveloper. If yes please let me know how to that.
    I creted a class using class wizard and added the following
    statement;
    System.out.println("testing");
    I able to compile the program without error, but how to execute
    it.
    raghu
    null

    Hi Jun Wu,
    Because without deploying, it doesn't allow me check how my java webdynpro application works!!
    I  need to execute my java web dynpro application and I dont have any access to SDM pins/passwords.
    Please share your valuable thoughts on the same.
    regards,
    Ajeeth Kumar S

  • Possible to execute complex query in ExecuteSQL method in DI Server??

    Hi All,
    Is it Possible to execute complex query in ExecuteSQL Method in DI Server?
    Regards,
    G.Suresh

    Hello Guru,
    It is possible. Mostly if it can be done in DI, it will also can be done in DI Server except metadata operaiton, transation management etc.
    I try the following complex query (join, nexted):
    The SOAP Request
    <?xml version="1.0" encoding="UTF-16"?>
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    <env:Header>
      <SessionID>4FFCFAA3-5493-456A-BC89-410B35AF096C</SessionID>
    </env:Header>
    <env:Body>
      <dis:ExecuteSQL xmlns:dis="http://www.sap.com/SBO/DIS">
       <DoQuery>SELECT OCRD.CardCode, OCRD.CardName, OCPR.Name FROM OCRD JOIN OCPR ON OCRD.CardCode = OCPR.CardCode WHERE OCRD.CardCode IN
    (SELECT DISTINCT ORDN.CardCode FROM ORDN)</DoQuery>
      </dis:ExecuteSQL>
    </env:Body>
    </env:Envelope>
    The SOAP Response:
    <?xml version="1.0"?><env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
    <env:Body><ExecuteSQLResponse xmlns="http://www.sap.com/SBO/DIS">
    <BOM><BO><AdmInfo><Object>oRecordset</Object></AdmInfo><OCRD><row><CardCode>C002</CardCode><CardName>SAP</CardName>
    <Name>2</Name></row><row><CardCode>C002</CardCode><CardName>SAP</CardName><Name>l</Name></row><row><CardCode>C002</CardCode>
    <CardName>SAP</CardName><Name>Z</Name></row></OCRD></BO></BOM></ExecuteSQLResponse></env:Body></env:Envelope>
    I think you can easily parse the result...
    Kind Regards
    -Yatseas

  • Accessing an executable as an CGI

    Hello,
    We have an (windows) executable as a CGI. It is used it multiple applications.
    How do we execute this from our web applications. It worked fine when we used
    Apache/Tomcat. Since it is the only 'static' thing we want to get rid of Apache
    and do it in WebLogic. I installed the executable in the directory %BEA_HOME\cgi-bin.
    I tried to configure an application as described in 'Configuring Web Application
    Components' but I get the 404 error. Can somebody help me out?
    We use WebLogic Server 6.1 on Windows NT

    hi.
    Are there any errors in the server log? You might post your cgi servlet settings here.
    You could also try using JNI to exec the native executable.
    Regards,
    Michael
    Marco de Booy wrote:
    Hello,
    We have an (windows) executable as a CGI. It is used it multiple applications.
    How do we execute this from our web applications. It worked fine when we used
    Apache/Tomcat. Since it is the only 'static' thing we want to get rid of Apache
    and do it in WebLogic. I installed the executable in the directory %BEA_HOME\cgi-bin.
    I tried to configure an application as described in 'Configuring Web Application
    Components' but I get the 404 error. Can somebody help me out?
    We use WebLogic Server 6.1 on Windows NT--
    Michael Young
    Developer Relations Engineer
    BEA Support

  • Is it possible to execute .bat file located in package ?

    Hi,
    in my application i execute a print.bat file using Runtime.exec(), i'd like to place this .bat in package, let's say com.me.testpackage. How is it possible to execute the batch file from that location?
    thanks

    jschell wrote:
    sabre150 wrote:
    jschell wrote:
    >Simple 'for' loops seem to work OK but still more research needed.
    There is escaping in the for loops which is necessary in a bat file and not needed at the command line.
    It seem to be that any command spanning more than one line fails. Fail? The example that gave shouldn't fail. It should simply run both echos.As I understand it, the command sequence
    @echo off
    goto XXX
    echo out
    :XXX
    echo last
    should just output 'last' and not 'out so if it prints both 'out' and 'last' then in my view it 'fails'. Am I missing something?
    >
    >>
    Makes me even more pleased that I work mainly with Linux.Looking up syntax - what about getopts (bourne and korn)? You can also create 'functions', which can be defined later (if I recall correctly) in the script and called multiple times. I don't know how that would work streaming it in.I don't know about consequences of the streaming approach forward definitions in 'bourne' and 'korn' though I was not aware that 'bourne' allowed them. For 'bash' where forward definitions do not seem to be allowed (could I be mistaken in this?) then using        Process process = Runtime.getRuntime().exec("bash", null, new File(System.getProperty("user.home")));the following very simple 'bash' script (which contains loops, if statements and functions but no goto or forward definitions) can be executed without problems - # Simple bash script
    function sayHello {
        echo "Hello" $1
    sayHello "World" ;
    for i in $( ls /tmp ); do
        echo file - $i
    done
    for i in `seq 1 10`;
    do
        echo "seq" $i
    done
    i=0
    while [  $i -lt 6 ]; do
    if [ $i -eq 4 ]; then
        echo "then" $i
    else
        echo "else" $i
    fi
        let i=i+1
    done
    i=12
    until [  $i -lt 10 ]; do
    echo "until" $i
    let i-=1
    doneIn the past, I have also published examples of how to run Perl scripts using the same basic approach. The heart of the examples is         final String perlScript = "#!/bin/perl\n" +
                "print \"PID $$\\n\";\n" +
                "print \"UID $<\\n\";\n" +
                "print \"EUID $>\\n\";\n" +
                "print \"GID $(\\n\";\n" +
                "print \"\\nProcessing the command line arguments\\n\";\n" +
                "foreach (@ARGV) {\n" +
                "    $n = factorial($_);\n" +
                "    print \"    $_! = $n\\n\";\n" +
                "}\n" +
                "print \"\\n\".'@INC'.\"\\n\";\n" +
                "foreach (@INC) {\n" +
                "    print \"    $_\\n\";\n" +
                "}\n" +
                "print \"\\n\".'%ENV'.\"\\n\";\n" +
                "foreach (keys %ENV) {\n" +
                "    print \"    $_==$ENV{$_}\\n\";\n" +
                "}\n" +
                "$x = theAnswerToTheUltimateQuestion();\n" +
                "print \"\\nThe answer to the ultimate question is ... '$x'\\n\";\n" +
                "sub theAnswerToTheUltimateQuestion()\n" +
                "{\n" +
                "    return 3*2*7;\n" +
                "}\n" +
                "sub factorial()\n" +
                "{\n" +
                "    my ($n) = @_;\n" +
                "    return ($n > 1) ? $n * factorial($n-1) : 1;\n" +
                "}\n";
            System.out.println(perlScript);
             * The perl source can be from any InputStream. Here I use a
             * ByteArrayInputStream just as a demonstration.
            final InputStream perlSource = new ByteArrayInputStream(perlScript.getBytes());
             * The '-' indicates that the Perl script comes from stdin. The "a","b","c" etc
             * are the command line arguments passed to the Perl script.
            final String[] command =
                "perl", "-", "5", "6", "7", "8", "9", "10"
            final Process process = Runtime.getRuntime().exec(command);piping the 'perlSource' stream to the process stdin.
    This runs as expected on both Linux (FC9 and Ubuntu 8.04) and on Windows using Active Perl.
    Please don't take my use of a String to hold the Perl script to mean that I in any way endorse this approach - I just wanted a simple means to create a self-contained example.
    >
    And the c shell has a goto also.One day I might find some time and investigate 'c' shell goto in this context - since I have not used csh for at least 8 years I am very rusty.
    I can't say that the 'streaming' approach will work with all Linux shells but I can say that on Linux I have had no problem with Perl and Bash. If anyone needs to use the 'streaming' approach with another shell then it takes just a few minutes to setup a test harness. If any problems are found then people can always resort to the 'Plan B' approach.
    I am still pleased I work mainly with Linux and Unix.

Maybe you are looking for

  • 2 monitors on Mac mini

    Can I use two separate monitors w Mac mini. 

  • [Solved] Virtual terminals/agetty overhanging screen.

    I've got a strange problem on my Asus A6Jc lappy with nVidia 7300 Go card and 1280x800 screen. X/Gnome/KDE/Openbox/Whatever is fine and acts normally, but the virtual terminals (Ctrl-Alt-F[1-6]) are bigger than my physical screen (vertically). Not a

  • Please help i have a bug ML 10.8.1,

    i have a MBP mid 2012 15,4 but in the screen you can see the information window stay 13 zoll display. what can i do or is this a bug smc reset ? <S/N Image Edited By Host>

  • Nano wont charge properly

    my nano will download songs and update but as soon as the update is done the nano stops charging, and it wont charge at all unless you are updating. it keeps dying on me please help   Windows 2000  

  • Server side programming fails!

    hello. i'm developing a messenger program. initial design had one client sending a message and the server echoing the message back to the client. it worked fine. now i'm making it for multiple clients. that is one client sending a message and multipl