Is it possible for an applet within a jsp to access a server session?

I was trying to find info (and sample code) where an applet that is embedded and running within a JSP page accesses the same session of the jsp page it is in.
The need is for the the applet to access a string within the session and capture it's value and then perform some actions with the string client side within the applet. The value of the string is not important for the example, just being able to access it is.
Also can javascript cause the applet to call the server on say an "onclick" event? If so, how is this done?
In otherwords, can javascript interact with an applet?

Check out the documentation on Heterogeneous Connectivity.
Hope this helps!

Similar Messages

  • Is it possible for a mac to run across a Windows based server such as in a school, and still be able to access all networked folders? I have been told that macs can only read down a certain number of folders

    Is it possible to run a mac on a windows based server? We have a server based on Windows 7 in our school, and our techies are reluctant to let me buy a mac as they say macs can only read a number of folders deep, which would preclude me from accessing shared folders on our servers. Is this true, and is there a way round this? I would eventually like to get a suite of macs, but because all our resources are on the server, I have to be able to access them.
    Thanks for any help,
    Mike

    I have found that both Linux and Mac (unix) are capable of reading "deep" folders while win 32 will have issues, your it people are clearly wrong.  I run a network with both win/mac. And as long as the win servers/pc's that have shares are set to allow apple file sharing in their folder properties.   And the macs are set to allow smb there should absolutely no trouble with you accessing anything across the platforms, heck, from a Mac to a win pc on some occasions you don't even need to include a "domain" name to log on to, and you can create aliases and make your own shortcuts etc... So you don't have to manually connect each time you boot up etc... But that's all personal preferences I suppose.
    All I can tell you is that, I do it on a daily basis managing a small business. So your answer is yes you can.

  • HT5622 Is it possible for someone to use my details to access my iMessage and FaceTime without my permission? If so, how do I prevent this?

    I have recently given my old iPhone 4s away as I now have an iPhone 5s.
    I reset and erased the old phone but I'm still cautious as to whether or not my information for iMessage and FaceTime can be accessed without my permission.
    Please advise.
    Luke.

    If you did Settings > General > Reset > Erase all content and settings on your old iPhone before disposing of it (as you should have), then your old iPhone will not allow anyone else to access FaceTime or iMessage from your account -- unless the new person knows your Apple ID and password.

  • Why does running an applet within a portlet not work?

    Hello,
    I have an applet and I want to run this in a portlet.
    I tried to load this applet into a portlet with SunONE Studio and Portlet Builder, and it works. The applet is running without problems.
    Now I tried to run this applet in a portlet under WebLogic 8.1 SP3. But the applet doesn't load. There ist only a gray rectangle to see. No error message, which would help to find the problem.
    To load the applet I'm using the Applet tag as follows:
    <APPLET archive='"+request.getContextPath()+"/folder/myApplet.jar' code='source/applet/myapp.class' ></APPLET>
    It's the same, I am using with SunOne Studio and there is the same package/directory structure in both.
    Any ideas?
    Is ist possible to run applets within portlets under WL 8.1?
    Thank you!
    Ines

    Hello,
    I have an applet and I want to run this in a portlet.
    I tried to load this applet into a portlet with SunONE Studio and Portlet Builder, and it works. The applet is running without problems.
    Now I tried to run this applet in a portlet under WebLogic 8.1 SP3. But the applet doesn't load. There ist only a gray rectangle to see. No error message, which would help to find the problem.
    To load the applet I'm using the Applet tag as follows:
    <APPLET archive='"+request.getContextPath()+"/folder/myApplet.jar' code='source/applet/myapp.class' ></APPLET>
    It's the same, I am using with SunOne Studio and there is the same package/directory structure in both.
    Any ideas?
    Is ist possible to run applets within portlets under WL 8.1?
    Thank you!
    Ines

  • Error when applet is trying to connect to WLS server

    Hello everyone,
    I'm currently having problems with applets and WebLogic. Though I know, applets are not the most appreciated way to do things with weblogic (or even in general), there are no real alternatives for us.
    We have a larger application consisting of several servlets, already integrated into WLS and using the data sources.
    Now we want to create a small piece of applet that uses WLS to get data from the same JDBC data sources to display and navigate inside charts. These might even be updated on a regular basis while the applet is running.
    So, there are two questions:
    First, is it possible for the applet to be available on the server and connect to WLS by creating an initial context? I'm currently trying and i get an "java.security.AccessControlException: access denied (java.lang.RuntimePermission setContextClassLoader)". See the attached code below to see the connection example.
    Second, if i can connect to the WLS, will this also be possible when the WLS is not localhost anymore, but another server? To clarify, an example:
    Can an applet that is running inside a WLS at "http://theotherserver.net:7001/myapp/MyApplet.class" connect to the WLS at "theotherserver.net"?
    I'd be glad if anyone could help me with that. The code I'm currently using (inside the init() function of the applet), is the following:
    public void init() {
         Context ctx = null;
         Hashtable<String, String> ht = new Hashtable<String, String>();
         ht.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
         ht.put(Context.PROVIDER_URL, "t3://localhost:7001");
         try {
              ctx = new InitialContext(ht);
         // Use the context in your program
              System.out.println("context success");
         } catch (NamingException e) {
         System.out.println("NamingException"); // a failure occurred
         e.printStackTrace();
         } catch (AccessControlException e) {
              System.out.println("security control exception when authing"); // a failure occurred
              e.printStackTrace();
         } catch (Exception e) {
              System.out.println("other exception"); // a failure occurred
              e.printStackTrace();
         } finally {
              System.out.println("finally");
              try {
                   ctx.close();
                   System.out.println("close");
              } catch (Exception e) {
                   System.out.println("close exception"); // a failure occurred
    When the applet is run, whatever I do in start() etc get's done (for example drawing charts with jfreechart), but the java console prints the following as a result of the failed connection to WLS:
    security control exception when authing
    java.security.AccessControlException: access denied (java.lang.RuntimePermission setContextClassLoader)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.Thread.setContextClassLoader(Unknown Source)
         at weblogic.corba.j2ee.naming.ORBHelper.createORB(ORBHelper.java:426)
         at weblogic.corba.j2ee.naming.ORBHelper.getORBReferenceWithRetry(ORBHelper.java:571)
         at weblogic.corba.j2ee.naming.ORBHelper.getORBReference(ORBHelper.java:547)
         at weblogic.corba.j2ee.naming.InitialContextFactoryImpl.getInitialContext(InitialContextFactoryImpl.java:85)
         at weblogic.corba.j2ee.naming.InitialContextFactoryImpl.getInitialContext(InitialContextFactoryImpl.java:31)
         at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:41)
         at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
         at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
         at javax.naming.InitialContext.init(Unknown Source)
         at javax.naming.InitialContext.<init>(Unknown Source)
         at com.igrafx.charter.program.CharterApplet.init(CharterApplet.java:70)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    finally
    close exception
    Edited by: user10921034 on 11.11.2009 09:46

    I have solved the above problem now. The problem was, that I only signed my own jar, but not the wlclient.jar, which also needs the rights to instantiate classes.
    This also solved my second question. Yet, there is another thing, now that I am trying to use JNDI to access a JDBC shared datasource from weblogic.
    The data source is accessible and working (tested from servlets). Now I'm trying to create a connection with the following code, but it does not get past the first lookup:
    try {
    DataSource ds = (DataSource) this.appletContext.lookup("ReportCentral");
    conn = ds.getConnection();
    conn.setAutoCommit(true);
    The thrown exception:
    java.lang.NoClassDefFoundError: weblogic/jdbc/common/internal/RemoteDataSource
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(Unknown Source)
         at java.security.SecureClassLoader.defineClass(Unknown Source)
         at java.net.URLClassLoader.defineClass(Unknown Source)
         at java.net.URLClassLoader.access$000(Unknown Source)
         at java.net.URLClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Unknown Source)
         at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
         at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
         at java.rmi.server.RMIClassLoader$2.loadClass(Unknown Source)
         at java.rmi.server.RMIClassLoader.loadClass(Unknown Source)
         at com.sun.corba.se.impl.util.JDKBridge.loadClassM(Unknown Source)
         at com.sun.corba.se.impl.util.JDKBridge.loadClass(Unknown Source)
         at com.sun.corba.se.impl.javax.rmi.CORBA.Util.loadClass(Unknown Source)
         at javax.rmi.CORBA.Util.loadClass(Unknown Source)
         at com.sun.corba.se.impl.presentation.rmi.StubFactoryFactoryStaticImpl.createStubFactory(Unknown Source)
         at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_Object(Unknown Source)
         at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_Object(Unknown Source)
         at com.sun.corba.se.impl.encoding.CDRInputStream.read_Object(Unknown Source)
         at com.sun.corba.se.impl.corba.TCUtility.unmarshalIn(Unknown Source)
         at com.sun.corba.se.impl.corba.AnyImpl.read_value(Unknown Source)
         at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_any(Unknown Source)
         at com.sun.corba.se.impl.encoding.CDRInputStream.read_any(Unknown Source)
         at weblogic.corba.cos.naming._NamingContextAnyStub.resolve_any(_NamingContextAnyStub.java:81)
         at weblogic.corba.j2ee.naming.ContextImpl.lookup(ContextImpl.java:208)
         at weblogic.corba.j2ee.naming.ContextImpl.lookup(ContextImpl.java:168)
         at javax.naming.InitialContext.lookup(Unknown Source)
         at com.igrafx.charter.program.CharterApplet.start(CharterApplet.java:178)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    I cannot find the mentioned class, to include it in my jar, neither am I sure that this is the best way to get a connection to the database this way.
    In the applet, it is NOT possible to create the connection by hand, as the user/password are only available to weblogic, but not the overlying J2EE applications.
    If i do that on my local system, nevertheless, it works:
    OracleDataSource ds = new OracleDataSource();
    ds.setURL("jdbc:oracle:thin:...@localhost:1521:XE");
    conn = ds.getConnection();
    This creates a valid connection.
    So, the major question is: How can I access the connection pool of Weblogic through an applet?

  • Catching an exception within a JSP

    Hi all,
    I need to catch an exception in a JSP before the errorPage handles it. Have tried with try-catch but it seems like the exception is thrown to the errorPage anyway. Do you know of any technique to handle this.
    In other words: I would like to specify program logic for one exception within the JSP itself. Let us say Customer.Authenticate() throws an Exception when the given e-mail is not included in customer-DB. I would like to append logic instead of being redirected to errorPage.
    Anyone done this, can it even be done?
    ,Chr

    I would try keeping the error page as it is and still adding the logic in the catch block. If that does not help, then remove the error page and use <jsp:forward> (after your logic) in the catch block to explicitly go to the error page.
    or if you want to process that logic anyways in case of an exception, try adding your logic in the finally block.

  • Possible to have an applet within an applet?

    Hi. I am designing a GUI using swing. It has a Card layout ie. different tab screens. On one of them I want to implement a pannel within which the user can scribble.
    I have the code for a scribble applet. can I run that applet within a pannel in my GUI?
    how?
    or if not, how can place the scribble code in my GUI code to work only in that pannel on one of the tab screens?
    Yhis has me rightly puzzled, and I am sure there is a simple answer. I would appreciate any help on this matter,
    Thanks...

    I haven't tried this but it seems like it ought to work:
    Since Applet extends Panel, just add an instance of the Applet to your display as you would any other panel, then call its init() and start() methods.

  • Specify Remote Location for PrintWriter (applet question)

    Hello,
    I am trying to use a Java applet to access a URL, read in its text content, and save it to a file. The applet is run off an online host (our school server) so I made it a signed JAR file so I could access other hosts. However, here is my problem. The applet itself is in a remote location (our school server, a unix server). I can edit the directory via SSH to add files, and these files become accessible via my homepage (where I'm running the applet from in my browser). But what I need to do is write a file IN THE SAME DIRECTORY as the applet is being run from (ie, the remote directory). But I find that when I run the applet from my browser, it instead by default saves the file I've written to in the local machine's home directory (the desktop). How can I force the applet to save/write to a file in that remote directory (I have the permissions set up on it so that non-owner can write to the directory).
    Maybe this isn't possible. I wasn't sure. Here is my code:
          //get URL containing the escape table
          URL inputURL = new URL(inputLocation);
          //make connection to the URL
          URLConnection inputCon = inputURL.openConnection();
          //save URL's contents as text file in same directory
          BufferedReader inputStream = new BufferedReader(new InputStreamReader(inputCon.getInputStream(), "UTF-8"));
          //save with same name as URL file
          File file = new File(inputURL.getFile());
          String filename = file.getName();
          PrintWriter outputStream = new PrintWriter(new File(filename), "UTF-8"); //this didn't work either: outputStream = new PrintWriter(filename, "UTF-8");
          //line of current input
          String line = null;
          //output text file to local text file line-by-line
          while((line = inputStream.readLine()) != null)
            System.out.println("line=" + line); //TEST TO MAKE SURE ACTUALLY READING FILE
            outputStream.println(line);
          }According to my System.out.println, it IS actually accessing the URL and reading each line from the URL's text file correctly, and outputStream.println(line) is correctly printing to the file; it's just doing it in the wrong place!
    Also, I should specify: I can't hard encode the file location. It could be anywhere in my html directory. Rather, I want a way to save it in the same directory as the applet was deployed from.

    It's for an assignment. All our assignments have to be applets and run from our unix server. I have to access a URL and get data from it, then create that file, then use that file as a reference table for something else.
    The tragic part is I think I have everything else working, but I've no way to test it, as I cannot figure out how to access URLs in jgrasp (my IDE - just running the java file itself as an applet within the IDE has the error message about being unable to connect to the URL, since the applet is not signed, but I've no way how to get around that within the IDE itself) so I am testing it directly on the server as a signed jar file so I can at least access the urls.
    The requirements stated:
    "make a text file (UTF-8 encoding) of the file name t in the same directory where an applet is deployed; "
    # A program must be written as an applet in Java. Other programming languages such as JavaScript cannot be used.
    # The applet must be deployed on the ITS Web server
    I could be missing something, honestly. >_< I might have a word with the TA. I'm just really frustrated since I have everything else working.

  • Using the Portal Single Sign-On for java applet clients

    Hi
    We have a task to build a java applet working within a portlet and comunicating to some session EJB(wrapped BC4J) running on the OC4J. The applet is presumably connecting to server via RMI. This connection should be restricted to some groups of portal users.
    When a user is entering the applet he is supposed to be already logged into the Portal.
    There is a lot of information on building custom secure portlets using only a pure HTML(same as JSP) client whith the help of the Portal Single Sign-On.
    But, is it possible to use the Single Sign-On for establishing a secure RMI connection from applet to OC4J without entering a password in the applet once more?
    Yuriy

    Perhaps you can write a small JSP page or PLSQL
    web procedure that will grab user name from
    the SSO Server (via SSOSDK/mod_osso)
    and invoke the applet with encrypted user name.
    The applet will receive the encrypted username
    and decrypt it to get the clear user name.
    This help to get Single Sign-On.
    To make sure that environment is secure, encrypted
    user name parameter should have random salt,
    user name, and time stamp to prevent replay attack.
    Applet must make sure that the encrypted users name
    time stamp set by the JSP/PLSQL page has value
    within a reasonable time limit like 5 minutes

  • Is it possible for me to swap out the apple logo in the message screen saver with my company's logo If so, how? Thanks!

    Is it possible for me to swap out the apple logo in the message screen saver with my company's logo? If so, how? Thanks!

    How long will my iPod service take?
    If you choose to use the Online Service Assistant, or service via Apple Technical Support: If your iPod is not personalized, you can expect service to be completed within approximately one week from the time you send your iPod to Apple. If your iPod is personalized, you can expect service to be completed within approximately ten calendar days from the time you send your iPod to Apple.
    Attention iPod shuffle customers: Service for iPod shuffle is performed by means of an express replacement program, via Online Service Assistant or Apple Technical Support. For more details, please review the Express Replacement Service tab on the left.
    Above from:
    Apple - Support - iPod - Service FAQ
    If it is caused by a hardware problem there is nothing you can do to prevent it from recurring unless it was caused by abuse like from dropping the iPod.
    Otherwise make sure you ask apple how they fixed. it.

  • Delivery without reference for stock transfer within the same plant 311

    Dear all,
    I need to create a delivery without reference for stock transfer within the same plant, movement 311,  i.e. just from 1 storage location to another storage location.
    I tried to use VL01NO with delivery type UL.
    Now my question is how can I assign a receiving plant for a customer?
    I can't do the MIGO or MB1B document because I need the delivery document (packing list, forms, Texts,...).
    It's possible this option???
    Thank you very much.

    Hi,
    What is the item category you are assigning while doing VL01NO?  Check the schedule line category for that item category assignment.  That Schedule line category has an option for one step GI.  There you can assign 311 or create a separate item category and schedule line category and in that SC assign 311. 
    Thanks
    Krish.

  • ClassFormatError when attempting to load an applet from within a JSP

    Greetings everyone.
    I have a problem that i seem unable to solve.
    I've created a web application. I'm using Java 1.4.2_05 and Tomcat. Right now i'm trying to load an applet from a JSP and i'm getting an error that, try as i might, i can't understand why it happens.
    Here is some detailed info:
    The applet's code:
    package smpb.myapp.controllers;
    import java.applet.Applet;
    import java.awt.Graphics;
    public class GUIApplet extends Applet
         public void init()
         public void stop()
         public void paint(Graphics g)
                  g.drawString("Hey hey hey",20,20);
               g.drawString("Hellooo World",20,40);
    The JSP's code:
    <%@ page language="java"
                   import="java.util.*"
                   session="true" %>
    <%
         String name = (String) request.getSession().getAttribute("userName");
    %>
    <html>
         <head>
              <title>Login</title>
         </head>
         <body>
              <h1><p align="center">Application</p></h1>
              <br>
              Welcome <%= name %>! Thank you for logging in!
              <br><br><br>
              <applet align="middle" code="smpb.myapp.controllers.GUIApplet.class" codebase="./" archive="MyApp_applets.jar">
                   Your browser does not support this feature.
              </applet>
              <br><br>
              <a href='<%=request.getContextPath() + "/LogOut"%>'>Log Out</a><br>
         </body>
    </html>-------------------------------------------
    When i reach this JSP the applet fails to load and i get the following error message at the java console:
    Loading applet ...
    Initializing applet ...
    Starting applet ...
    Connecting http://127.0.0.1/MyApp/MyApp_applets.jar with no proxy
    Connecting http://127.0.0.1/MyApp/MyApp_applets.jar with cookie "JSESSIONID=A8EECE5E39458739C760D8907762C507"
    Last modified time and/or expiration value is not available.  Jar file will not be cached.
    Connecting http://127.0.0.1/MyApp/MyApp_applets.jar with no proxy
    Connecting http://127.0.0.1/MyApp/MyApp_applets.jar with cookie "JSESSIONID=A8EECE5E39458739C760D8907762C507"
    Connecting http://127.0.0.1/MyApp/smpb/myapp/controllers/GUIApplet.class with no proxy
    Connecting http://127.0.0.1/MyApp/smpb/myapp/controllers/GUIApplet.class with cookie "JSESSIONID=A8EECE5E39458739C760D8907762C507"
    Last modified time and/or expiration value is not available.  Jar file will not be cached.
    Connecting http://127.0.0.1/MyApp/smpb/myapp/controllers/GUIApplet.class with no proxy
    Connecting http://127.0.0.1/MyApp/smpb/myapp/controllers/GUIApplet.class with cookie "JSESSIONID=A8EECE5E39458739C760D8907762C507"
    java.lang.ClassFormatError: smpb/myapp/controllers/GUIApplet (Bad magic number)
         at java.lang.ClassLoader.defineClass0(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
         at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:157)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
         at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:123)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
         at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:561)
         at sun.applet.AppletPanel.createApplet(AppletPanel.java:617)
         at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1856)
         at sun.applet.AppletPanel.runLoader(AppletPanel.java:546)
         at sun.applet.AppletPanel.run(AppletPanel.java:298)
         at java.lang.Thread.run(Thread.java:534)
    Exception: java.lang.ClassFormatError: smpb/myapp/controllers/GUIApplet (Bad magic number)-------------------------------------------
    The JSP is in the root directory of the web application's path right along with the jar file. The jar file itself has the following structure:
    Archive:  HelpDesk_applets.jar
      Length     Date   Time    Name
            0  05-17-06 12:17   META-INF/
          106  05-17-06 12:17   META-INF/MANIFEST.MF
            0  05-10-06 17:14   smpb/
            0  05-10-06 17:14   smpb/myapp/
            0  05-12-06 16:50   smpb/myapp/controllers/
          794  05-12-06 17:15   smpb/myapp/controllers/GUIApplet.class
          900                   6 filesNow, i've tried loading the very same jar file that i use in the JSP through a static HTML which is virtually identical to the JSP i presented and everything works just fine. I've checked and rechecked to see if all the permissions to access the jar file were accurate, i checked to see if Tomcat had it's MIME settings correctly configured so that there was no chance that the files were being corrupted during the load (as that is a usual cause for the problem, or so i've gathered) but to no avail. I've searched the web, including these forums, and found similar problems but no conclusive solution. I can't seem to figure out, at all, what could possibly be wrong. Does anyone have any ideas? I've tried to be as thorough as i could from the start, so, any help would be deeply appreciated.

    Hi mshah101,
    This can happen if the applet is compiled using an higher version of java and the browser is pointing to an older version (even if minor version number is higher)

  • Is it possible for me to script Illustrator to save as PDF and attach to email ?

    Hi,
    I am after a script to save my current working file as PDF (with some settings) and then bring up a blank outlook email with that file attached ?
    I do a lot of artwork and have to get it approved, I am getting bored of manually saving to PDF then going to find the file and then clicking send to > mail recipient etc etc
    You know the drill guys.
    So would it be possible for me to just run a script that does all that for me ready to insert the persons name or even add the persons name within the script ?
    thanks
    Lee

    Well, as the kids' paper-crafts book I used to try to put together which frustrated the hell out of me, mockingly read on the bottom of the instructions: "ТЕРПЕНИЕ И ТРУД ВСЕ ПЕРЕТРУТ"
    That is, patience and perseverance will overcome all. 
    To use the below, you've gotta get Autohotkey_L, I believe, and it's not that hard to use.. but it takes some time to learn the various things if you want to write your own ones like this:
    {{YOUR_OWN_HOTKEY_HERE}}::
      MyTempFile = C:\Users\{{YOUR_USER_NAME}}\last_proof_sent.txt
      Run {{YOUR_JSX_SCRIPT}}.jsx                                                  ;Save the PDF proof - the script needs to write a temp text file in a place somewhere, which writes the full name of your saved PDF!
                                                                                                              ; I called my temp text file "last_proof_sent.txt"
      CurrentDateTime := A_Now                                                        ;get current time
      sleep, 500
      FileGetTime, FileTime, %MyTempFile%                                              ;get mod date of this temp file
      TimeCounter = 0                                                                                ;initialize time counter for waiting for PDF to save
      While(CurrentDateTime > FileTime and TimeCounter < 1000)                    ;waiting period to see if temp text file has updated since start of this script
      sleep, 20
      TimeCounter++
      FileGetTime, FileTime, %MyTempFile%                                                      ; each time get the modification date of the temp text file
      If(CurrentDateTime < FileTime){
      FileRead, MyPDFFileName, %MyTempFile%                                                  ;read the contents of temp file for location of PDF file path (It was written there by your JSX script, hopefully)
      If Not ErrorLevel{
      m := ComObjActive("Outlook.Application").CreateItem(0)
      m.Subject := "Greetings to all"                                                                      ; <---- Subject -----
      m.To := "address here"                                                                                    ; <---- Recipient -----
      m.HTMLBody := "email body"                                                                          ; <---- Email message body -----
      m.Display
      m.attachments.add(MyPDFFileName)                                                             ;  This is the attachments!
      } else {
      MsgBox, Error Reading the temporary file %MyTempFile%
      } else {
      MsgBox, "Sorry, action timed-out."
    return
    *** I have tested this on one file where I had a test folder on my desktop.  The ExtendScript likes to put the file path like "~Desktop/", but I used myFile.fsName to get the full "C:/Users/Me..." name in case it was gonna be confusing to AHK.

  • Is it possible to replace applet with JSP

    I m working for the extension of the a Chat Application which is Applet based...
    It is slow as the Applet loaded...
    Is it possible to replace the applet with th JSP....
    what r the pro and cons of it???
    Thanks in advance...

    sure it is possible.
    main difference is, that applet maintance a permanten connection to the server and therefor has a 'smaller' communication where as with servlets/jsp the client will have to communicate more information for each request.
    have a look at pushlets.com, a servlet based framework that keeps the connection to the client open (works with hidden frames and dhtml). very smart framework.

  • Hi., i bought a 8gb ipod touch for $199 on September 2nd.. but apple has announced that 16GB ipod will be now available at the same price.. is it possible for me to exchange my 8 to 16..??

    hi., i bought a 8GB ipod touch for $199 on September 2nd.. but apple has announced that 16GB ipod will be now available at the same price.. is it possible for me to exchange my 8GB to a 16GB one..??

    If you purchased it within the last 14 days you can return it for a full refund and then purchase the 5G.

Maybe you are looking for