Get system variable and execute a Java Script

I'm not sure it is the appropriate forum to ask this
question. I'm using Captivate 2 without LMS.
I need to execute a java script that take read a system
variable (eg. USERNAME) and opens an URL using the USERNAMe as
parameter. The idea here is to update a database opening a specific
URL for a specific USERNAME.
Any one has an example to do something similar ?

Hello All,
Could anyone please help me with some examples or
tutorials how I can create Java Applet to run telnet
to UNIX and execute a shell script?
Presumably you don't need to write the telnet code yourself (like for a class.)
If so then you can use this...
http://jakarta.apache.org/commons/net/
There might be some other dependencies from other commons stuff that you will need to resolve to run it.
Once you have that, presumably you are not telnetting back to the source of the applet. If so you will need to deal with security for the applet. Usually that means that you must sign the applet. Otherwise you will have to modify the policy file on each client machine that will run the applet.

Similar Messages

  • How can i get system variable using java

    Hi,
    I just want to know how can i get system variables using java code.
    for example i want to get the the date for today or i want to get the number of processes that's running.
    Thanks alot

    Hi,
    I just want to know how can i get system variables
    using java code.
    for example i want to get the the date for today or i
    want to get the number of processes that's running.
    Thanks alotSome generic "system variables" are available though Java, usually through the System class.
    Date today = new Date();
    is instantiated with the current date and time.
    Other system values, like environment values, should be passed to java through the command line (-D option) by setting system properties.
    Finally, platform specific values like the number of processes running will have to be written in platform specific code and executed by JNI (java native interface).
    Java is platform or system agnostic. Common system values, like time, are implemented. Hopefully you won't need platform specific values.

  • Not only does Adobe flashplayer continue to crash on my operating system (windows 7) but now java script is having issues .... what is wrong with firefox????

    for months I have checked the forums, and seen the same issues with Adobe Flash Player ... I have uninstalled and reinstalled too many times now and am totally frustrated with Firefox,. I just get it working again and Firefox updates and then I have the same issues ... and now my java script is screwing up and it never did before .... this all came after the latest update .... is anyone else having these issues or is my operating system under attack???

    Recent crashes of certain multimedia contents (this includes Youtube videos, certain flash games and other applications) in conjunction with Firefox are most probably caused by a recent Flash 11.3 update and/or a malfunctioning Real Player browser plugin.
    In order to remedy the problem, please perform the steps mentioned in these Knowledge Base articles:
    [[Flash Plugin - Keep it up to date and troubleshoot problems]]
    [[Flash 11.3 crashes]]
    [[Flash 11.3 doesn't load video in Firefox]]
    Other, more technical information about these issues can be found under these Links:
    http://forums.adobe.com/thread/1018071?tstart=0
    http://blogs.adobe.com/asset/2012/06/inside-flash-player-protected-mode-for-firefox.html
    Please tell us if this helped!

  • Getting system Variables

    Hi. I'm creating jsp page, which uses ssl connection. I want to print information of user logged into page, but I can't understand - how to get system variables in JSP page?
    directory httpd.conf file:
    <Files ~ "\.(cgi|shtml|php)$">
    SSLOptions StdEnvVars ExportCertData
    </Files>
    # ExportCertData
    When this option is enabled, additional CGI/SSI environment variables are created: SSL_SERVER_CERT, SSL_CLIENT_CERT and SSL_CLIENT_CERT_CHAINn (with n = 0,1,2,..). These contain the PEM-encoded X.509 Certificates of server and client for the current HTTPS connection and can be used by CGI scripts for deeper Certificate checking. Additionally all other certificates of the client certificate chain are provided, too. This bloats up the environment a little bit which is why you have to use this option to enable it on demand.
    For example, I want to get SSL_CLIENT_CERT variable. How should I do it?

    Did you tried
    System.getProperty("");
    Just check if it works for you.

  • Hp photosmart premium wireless C309 can't print after updating to IE 9 and i think java script

     hp photosmart premium wireless C309  can't print after  updating to  IE 9 and i think java script.  I am a realtor working from home and inorder to use the forms it required I update to IE9 and I think java,   this is the link.   http://www.car.org/tools/zipform6/   After doing so my printer does not work.  I tried to go on line and reinstall from a link on line but it did not work.  I don't know what to delete and what to add and how to get the " HP sSolution center" to work again.  the printer was already poor performance from day one.  Always having to unplug and restart and the black ink always runs out too quick.  but right now my concern is just being able to print and scan.  I am in the middle of a deal and can not communicate  with all parties effectively.  please help

    What error messages are you getting?
    What OS are you using?
    How is the printer connected to the computer?
    -------------How do I give Kudos? | How do I mark a post as Solved? --------------------------------------------------------

  • How to get system status and user status ?

    how to get system status and user status for the given production order?
    In which PP table we can
    find these?
    Thanks&Regards
    Satish

    Hi Ram,
    Use the FM "STATUS_READ" to read both the system and user statuses for an Order.
    Alternatively, the following tables store the user and system status info:
    JSTO- Status object information
    JEST- Individual Object Status
    Hope this helps.
    Let me know if u need further information.
    Regards,
    Sonal

  • How to get system date and time?

    Can someone show me a code on how to get system date and time.
    Thanks!

    there is one really easy way to get system time, the api gives a great example of code on this. use gregorian calendar, which you'll find in the api under GregorianCalendar. You only need to create one instance of GC, ie Calendar time = new GregorianCalendar();
    you save seconds, minute and hours into int values, so you don't have to access the system time every second, you can create a thread which adds one to the int second value, if oyu see what i mean, for example, i have saved the hours, minutes and seconds as int values;
    int hour, minute, second;
    i can then create a thread (Thread thread = new Thread(this) and run it like:
    Calendar time;
    int hour, minute, second;
    Thread thread = null;
    public MyTime() {
    hour= time.get(Calendar.HOUR_OF_DAY);
    minute = time.get(Calendar.MINUTE);
    second = time.get(Calendar.SECOND);
    if(thread == null) {
    thread = new Thread(this);
    thread.start();
    public void run() {
    Thread t = Thread.currentThread();
    while(thread == t) {
    thread.sleep(1000);
    second++;
    if(second > 59)
    minute++;
    if(minute>59)
    hour++;
    formatTime();
    public void formatTime() {
    second = (second > 59? 0 : second);
    minute = (minute > 59? 0 : minute);
    hour = (hour > 23? 0 : hour);
    System.out.println(hour+":"+minute+":"+second);
    public static void main(String[] args) {
    new MyTime();
    I know this looks like gibberish but it should work. If not, try to fix the problem, i have written from memory really but i guarantee you, this gets the time then every second, simply adds one to the second and then formats time. You can also access the day, month and year then format them using the above code. I don't like giving code since you should really do these things yourself but it is 2:04am, i have nothing better to do and i am not tired so i did you a favour - i have become what i always did not want to, someone ho stays upall night writing code.

  • How to parser a HTML page to get its variable and values?

    Hi, everyone, here is my situation:
    I need to parser a HTML page to get the variables and their associated values between <form>...</form> tag. for example, if you have a piece of HTML as below
    <form>
    <input type = "hidden" name = "para1" value = "value1">
    <select name = "para2">
    <option>value2</option>
    </form>
    the actual page is much complex than this. I want retrive pare1 = value1 and para2 = value2, I tried Jtidy but it doesn't reconginze select, could you recomend some good package this purpose? better with sample code.
    Thanks a lot
    Kevin

    See for example Request taglib from Coldtags suite:
    http://www.servletsuite.com/jsp.htm

  • I just downloaded and instaled firefox 4. Now, everytime I institute a command I get a po[p-up from Java script that tells me to uninstal set. I cannot go on untin I press ok and then I am good for one more command and it starts with the pop-up again.

    I'm not even sure if this is an extension or plug-in and all I can tell you is what I have already stated. I can only make one command at a time and after each one I get a pop-up from Java script that says uninstal set. I must depress ok to move on, but only for one more command and it starts over again. This also happened when I tried to instal firefox 4 a couple months ago and I deleted the program and went back to an earlier version.

    Mail troubleshooting - Yosemite
    Troubleshooting sending and receiving email messages
    Troubleshooting sending email messages
    SMTP servers keep going offline

  • Button executing CloseWindow Java Script and raising event on server

    Hi All.
    Somebody can help me with this:
    <b>What i'm needing:</b> an 'END' button on a BSP, when the user click on this button just show an aswer box asking if the user wants to close the windows, in case to click yes close the current window and execute a business logic in the controller.
    <b>What i have:</b> a button with the event onClientClick invoking a Java Script function which is showing the answer box and the event onClick which raise the event on the server side. The thing is if the user click on yes then i'm closing the current window and the server event never is triggered. This is not working !!!
    Any ideas ? some sample code ?
    Thanks in advance.
    Armando.

    Hi Armando,
    The 'Yes' on the <i>Confirm dialog box</i> (Client Side Scripting) has to tell the application (Server side scripting) to call your METHOD XXX. This is done by passing querystring <i>exit=X</i> to the URL.
    1. Comment onClick event of the button.
    2. Modify the code the JS function of your End button as follows
       func_end()
    //if no
      // your original code
    // if yes
    document.location.href = document.location.href + '?exit=X';
    3. Add following code to DO_REQUEST
      IF REQUEST->GET_FORM_FIELD( NAME = 'exit' )  ne space.
    *your method will be called only when there is an exit=x in the url
           call method XXX.
    *set a page attrib as follows
           l_exit = 'X'.
      ENDIF.
    4. Add following code to your layout
    <%if l_exit = 'X'.%>
    <script>
    window.close();
    </script>
    <%endif.%>      
    Regards,
    Alwyn

  • Ever since I downloaded FF's v6, everytime I go to YouTube and open a video, I get an error message that says: "[Java Script Application] Error: Div is null" How do I fix this problem?

    If I go to YouTube, no matter what video I click on to watch, the error message "[Java Script Application] Error: Div is null" pops up. It started happening right after I updated to FF v6. I also have installed the latest version of Java. I submitted this question a few weeks ago, but never received a reply.
    Thanks for any help you can provide to fix this.
    Scott Cromwell
    [email protected]

    hello, can you try to replicate this behaviour when you launch firefox in safe mode once? if not, maybe an addon is interfering here...
    [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]]

  • How to get the system date and time using java

    hi,
    I want system date in my out put. how to access system date. can v use utill packaegs (or) sql. which one is the best to get.
    Thanks & Regards,
    Kenny.

    import java.util.Date;
    import java.util.Calendar;
    import java.util.GregorianCalendar;
    public class MyClass {
    public void setTimeStamp() {
    int hour, minute, second, time = 0;
    Date dt=new Date();
    System.out.println(dt.getDate());
    System.out.println(dt.getMonth());
    System.out.println(dt.getYear());
    Calendar cal = new GregorianCalendar();
    hour = cal.get(Calendar.HOUR_OF_DAY);
    minute = cal.get(Calendar.MINUTE);
    second = + cal.get(Calendar.SECOND);
    System.out.println (hour + ":" + minute + ":" + second);
    public static void main (String args[]){
    MyClass app = new MyClass();
    app.setTimeStamp();
    }

  • How to compile and execute a Jython script with parameters (?)

    I am writing a scripting extension mechanism for a big server project we've built over the last year and a half.
    What I want to acheive is:
    - system authors upload scripts (via a web front end)
    - the system checks and compiles the script
    - stashes the compiled script away against a named event.
    When the event occurs the compiled script is called by the server with a list of parameters (current user id, various numbers describing the system state).
    Now I can upload and compile the script just fine using :
    PyCode somePyCode = __builtin__.compile ( script, "<>", "exec");
    ...and deal with any errors ...and stash the script away against a named event...etc.
    And it is easy enough to call this code with
    aPythonInterpreterInstance.exec ( somePyCode );
    but that doesn't pass my parameters through.
    It seems to me there's three obvious ways to do this:
    (1) specify that each script has a named target:
    def onEvent(eventid , userid):
    ... and use one of the PyCode.call() methods
    - but these aren't sensibly documented in the javadocs so it could take a while to figure out what's really going on.
    (2) specify that each script contains a class def and implements a __call__ method - but I can't see how to get the PyClass object out of the PyCode object returned by __builtin__.compile
    (3) put the variables into the local namespace and then execute the script (without a named method or class) - but this means that I would have to clean down the local namespace each time (- and anyway what is it local to?).
    (Did I mention execution speed is important to this app and I need to service multiple threads?)
    Thanks in advance,
    Tony
    ps. hope this isn't o/t to you.

    Some days you just know the synapses aren't talking.
    Of course when you exec() py code with def'd functions and class definitions in you're not executing the function(s) but defining them. Meaning that my question was all back to front in the first place.
    All four copies.

  • Telneting to a remote host and executing unix shell script

    I am using VPN.I want to telnet to a remote server and execute some script there and show it the output in my front end..is it easily possible thru java..i know it can be easily done thru Python...can anyone let me knw if this can ve achieved properly thru java..thnx plz let me knw ASAP.

    Yes surely I have wriiten the code..
    I have first used a Socket to connect to teh host at port 23.
    Then i am using outstream to give the user and passwd .. but in my Inputstream i am getting some vague outputs (some symbols..$,%,etc..) This is the code for ur reference....
    import java.net.*;
    import java.io.*;
    class Telclient {
    public static void main(String args[]) {
    int c;
    try{
    Socket s=new Socket("abc.net",23);
    InputStream in=s.getInputStream();
    OutputStream out=out.getoutputStream();
    String str="user" + "\n" + "password" + "\n";
    byte buf[]=str.getBytes();
    out.write(buf);
    while((c=in.read()) != -1) {
    System.out.println((char)c);
    s.close();
    Please help with teh code , bcoz its not really working..Need urgent helpI also used TelnetClient from jakarta , but failing to understand
    how to use those classes to use..can anyone show me an example...

  • I'm trying to download Firefox 4 onto Windows 7 platform. I keep getting an error message that says Java script has an error in Chrome ? Unable to complete download. Constant ahngs & freezes

    I am running on Windows 7 platform. I tired to download the latest Firefox 4 release. Each time, I get the message that "there is an error on line 20 in Java script Chrome that is preventing the download from continuing. I've run Fox in safe mode & still get the same message.

    Your More system details list shows that you use Firefox 4:
    *Mozilla/5.0 (Windows NT 6.1; rv:2.0) Gecko/20100101 Firefox/4.0
    Are you trying to (re)install Firefox 4 or do you get that error if you start Firefox?
    Do a clean (re-)install:
    * Download a fresh Firefox copy and save the file to the desktop.
    * Firefox 4.0: http://www.mozilla.com/firefox/all.html
    * Uninstall your current Firefox version and remove the Firefox program folder before installing that copy of the Firefox installer.
    * Don't remove personal data if you uninstall the current version.
    * It is important to delete the Firefox program folder to remove all the files and make sure that there are no problems with files that were leftover after uninstalling.
    Your bookmarks and other profile data are stored elsewhere (not in the Firefox program folder) and won't be affected by a reinstall, but make sure that you do not select to remove personal data if you uninstall Firefox.
    If that still doesn't work then create a new profile as well.
    See [[Basic Troubleshooting#Make_a_new_profile|Basic Troubleshooting&#58; Make a new profile]]
    If that new profile works then you can transfer some files from the old profile to that new profile (be careful not to copy corrupted files)
    * http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox

Maybe you are looking for

  • How can I set up a home wireless network with Comcast high speed internet?

    I just signed up for Comcast High Speed Internet. I was able to get my Power Mac onto the internet. However, I connected my Airport Extreme and am unable to get it to recognize that I have an internet connection. I want to set up a wireless network i

  • Optical drive not working only ejecting DVDs

    Hi guys, I have a Macbook Unibody model no MacBook5,1. The thing is a month back the optical drive stopped working. I insert a DVD, its tries to read it for about 15 seconds and ejects it. Now the funny thing is last night i tried playing Dexter on i

  • Sudden fail to read external hard drive

    Hi, Im using both OSX and Windows 8. And I usually store my stuffs such as movies, documents, and some utilities in my 1TB external hard drive. And Its format is "Mac OS Extended". There was no problem until just now. After I got home and tried to lo

  • How do I change the order of a drop down field of an existing form?

    I have added additional responses to a drop down field and I want to reorder with previous response options.  The move up and move down feature does not work.   

  • Game controller for MacBook Pro?

    Are ANY game controllers made especially for Mac? I have tried the Logitech wired version and the Logitech Rumblepad 2 wireless version and neither seem to work with my G5. I even added USB Overdrive, which recognizes the Logitech controllers, and ha