Problem invoking Javascript from applet

Hi,
I have a hidden iframe in my JSP. While submitting the form within the JSP, I set the target of the response page as the iframe and disable all the form elements in the JSP . The response page contains an applet that pops up a window(a JFrame). On pressing the close button of the applet's frame, I invoke a Javascript method in the JSP. This javascript method enables all the components on the JSP.
Now the issue is that, when I press the close button, the browser just hangs... This doesn't happen on all the browsers.. It works with Opera. In IE it doesn't work all the time. Some times IE just hangs... Any idea what the issue could be?? Pls let me know if the problem is not clear..
Thanks in advance..
regards,
Anand

Funny I've just posted something about this on another thread.
http://forum.java.sun.com/thread.jsp?forum=54&thread=157547
You can apparently call methods on your applets from javascript.
http://developer.netscape.com/docs/manuals/communicator/jsguide4/livecon.htm#1007749
I know that most of the LiveConnect package works in NS4, NS6, IE4 and IE5, but I have always called out to JavaScript from Java not the other way around so I cannot vouch for this in IE.

Similar Messages

  • Invoking javascript from applet

    hai everyone there,
    I would like to know, how to invoke javascript from an
    applet when I pressed the button in applet.
    thanks in advance
    s.radhakrishnan

    Funny I've just posted something about this on another thread.
    http://forum.java.sun.com/thread.jsp?forum=54&thread=157547
    You can apparently call methods on your applets from javascript.
    http://developer.netscape.com/docs/manuals/communicator/jsguide4/livecon.htm#1007749
    I know that most of the LiveConnect package works in NS4, NS6, IE4 and IE5, but I have always called out to JavaScript from Java not the other way around so I cannot vouch for this in IE.

  • Calling javascript from applet

    I want to access some javascript code from an applet.
    The applet should use swing, so the html page has all the code to launch java plug-in.
    As per jsbible, ch. 38, I import netscape.javascript classes and insert the following statement in init():
    mywin = JSObject.getWindow(this);
    While opening in browser, I get the following error:
    netscape.javascript.JSException
    at netscape.javascript.JSObject.getWindow(Unknown Source)
    at ShowDoc.init(ShowDoc.java:19)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Q1. How should the statement look? The problem seems to be with this, but I don't know what to replace it with. Or it could be Q2:
    Q2. Where shoud the magic word MAYSCRIPT be placed in the swing applet call (I'm using the universal template - both IE and NS - in htmlconverter).
    Thank you all

    I narrowed the problem to Q2:
    Where in the call of a swing applet does one insert the MAYSCRIPT parameter?

  • Problem invoking JVM from Windows

    Hi all,
    I tried to create a JVM instance as laid out in the examples. The JVM is never getting created. I am using Visual C++ (I need to, when the code works I will be creating a DLL that is an addon to someother piece of software).
    I have posted the code below::
    #include "stdafx.h"
    #include "invoke2.h"
    #ifdef _DEBUG
    #define new DEBUG_NEW
    #undef THIS_FILE
    static char THIS_FILE[] = __FILE__;
    #endif
    // The one and only application object
    CWinApp theApp;
    using namespace std;
    int main(void)
         int nRetCode = 0;
         // initialize MFC and print and error on failure
         if (!AfxWinInit(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), 0))
              // TODO: change error code to suit your needs
              cerr << _T("Fatal Error: MFC initialization failed") << endl;
              nRetCode = 1;
         else
              JNIEnv *env;               /* The java vm environment                                        */
              JavaVM *jvm;               /* The actual jvm                                                  */
              CString fname;               /* The file name of the generated intermediate obj file */
              JDK1_1InitArgs vm_args;
              jint res;
              jint vmavail;
              jclass cls;
              jmethodID mid;
              //char classpath[4096];
              bool viewerready;          /* is this java viewer valid?                                   */
              vm_args.classpath=".";
              vm_args.version = JNI_VERSION_1_4;
              vmavail=JNI_GetDefaultJavaVMInitArgs(&vm_args);
              if(vmavail < 0)
                   AfxMessageBox(" That VM version is not available. ",100,100);
                   viewerready=false;
                   jvm=NULL;
                   env=NULL;
              else
                   vm_args.classpath=".";
                   res = JNI_CreateJavaVM(&jvm,(void **) &env,&vm_args);
                   if(res < 0)
                        AfxMessageBox("Could not create JVM instance. \n Check your classpath. \n 3D viewer will not be available. ",100,100);
                        jvm=NULL;
                        env=NULL;
                        viewerready=false;
                   else
                        cls = env->FindClass("OBJViewer");
                        if(cls == 0)
                             AfxMessageBox("Can't find the java OBJViewer class. ",100,100);
                             viewerready=false;
                        mid = env->GetMethodID(cls, "OBJViewer", "");
                        if(mid == 0)
                             AfxMessageBox(" java class OBJViewer has no constructor OBJViewer() ");
                             viewerready=false;
                        env->CallStaticVoidMethod(cls, mid);
         return nRetCode;
    }

    Hey guys :)
    I incorporated the changes suggested by David and "reberst" and then did the stuff told by "LathaDhamo".
    Now I am able to invoke the VM without problems and my test program runs and displays windows and takes in input etc.. Thank you, Thank you, Thank you!!
    But now, I noticed that all this happens only when I am in debug mode in VC++ and step thru the program. When my external program loads the DLL I created automatically, I get the error message that the "JavaTest" class was not found. This will lead to errors when I deploy the DLL or package it for others. How do I ensure that the class is always found? What do I have to do?
    I am sorry for being so amtuerish and asking so many questions. This is my first time using JNI from the native side.
    Thank you,
    vijai.
    JavaOBJViewer::JavaOBJViewer(void)
         memset(&args, 0, sizeof(args));
         args.version = JNI_VERSION_1_4;
         args.nOptions = 2;
         options[0].optionString = "-Djava.class.path=.";
         options[1].optionString = "-Djava.library.path=.";
         args.options = options;
         args.ignoreUnrecognized = JNI_TRUE;
         res=JNI_CreateJavaVM(&jvm, (void **)&env, &args);
         if(res < 0)
              AfxMessageBox(" The JavaVM could not be initialized. \n Refer to the documentation on environment variable settings. \n 3D Viewer will not be available while modeling. ");
              jvm=NULL;
              env=NULL;
              viewerready=false;
         else
              cls = env->FindClass("JavaTest");
              if(cls == NULL)
                   AfxMessageBox("Can't find the java JavaTest class. \n 3D viewer will not be available while modeling. ",100,100);
                   viewerready=false;
              else
                  mid = env->GetStaticMethodID(cls, "main", "([Ljava/lang/String;)V");
                   if(mid == NULL)
                        AfxMessageBox(" java class JavaTest has no main method. ");
                        viewerready=false;
                   else
                        tempf = env->NewStringUTF("testenvp.obj");
                        logf = env->NewStringUTF("java_viewer_log.txt");
                        if((tempf == NULL) || (logf == NULL))
                             AfxMessageBox("The Java VM had insufficient memory to create the argument array. ",100,100);
                        else
                             mainargs = env->NewObjectArray(2,env->FindClass("java/lang/String"), logf);
                             if(mainargs == NULL)
                                  AfxMessageBox("The Java VM had insufficient memory to create the argument array. ",100,100);
                             else
                                  env->SetObjectArrayElement(mainargs,2,tempf);
                                  env->CallStaticVoidMethod(cls,mid,mainargs);
                                  jthrowable exc;
                                  exc = env->ExceptionOccurred();
                                  if(exc)
                                       AfxMessageBox(" An unknown exception occurred. ",100,100);
                                       viewerready=false;
                                  else
                                       viewerready=true;
    }

  • Problem loading models from applet

    Hello, I am trying to convert a collaborative CAD program I wrote into an applet.
    The program loads .OBJ files, and I can not seem to convert my code for it to work as an applet.
    Is it possible to package the .OBJ files into the applet .JAR file so that they are downloaded and loaded out of the .JAR?
    I am at wits end here, having tried many things.
    I know an applet can't read from the hard disk...
    And to cover the major areas of concern:
    Program packaged in a jar.
    Each class is part of a package, OOP_PA4
    so the file structure is
    OOP-PA4.jar / OOP_PA4/ Classes etc
    Dont know if that helps.
    Thanks

    I see three main options:
    - If the files to read are in the JAR, the ClassLoader could give you a stream to read them by means of the getResourceAsStream. But this means the are packaged togheter with your application code, adn so allways the same.
    - An applet, unless in a signed JAR file and authorized in the local JVM does not have access to the local resources, such as files, printers, etc. Your best option if you need access to files on the local disks is to use Java PlugIn or Java WebStart, both also require a signed JAR but much more portable between brosers. Java WebStart is particularly nice, check it.
    - An applet can open network connections to the server from where it was downloaded, so if you place your files in the same web server in which your web page and applet are, the applet's code should be able to open an HTTP connection and get them without deeding to sign the JAR.
    Regards

  • Problem invoking iTunes from certain browsers

    Users on Mac OSX using Firefox and Opera cannot open iTunes from the following iTunes U enabled URLs (http://asuonline.asu.edu/itunesu, http://itunes.berkeley.edu, http://itunes.stanford.edu, http://www.fuqua.duke.edu/itunes.), and our own URL. Is this a browser specific issue?

    I don't know about Opera, but I think the cause of this on Firefox is your preferences.
    In the address bar type: "about:config". Now in the Filter text area that has appeared type "itmss".
    Make sure that the value of the "network.protocol-handler.external.itmss". The value is true.
    Now enter this url into the address bar:
    itmss://deimos.apple.com/
    This will likely bring up a dialog box in Firefox which basically asks if you are sure you want to use an application different from Firefox to open this URL. Check the "Remember...." box and then click "Okay". That should permanently solve this problem.
    This is a hassle, but it is a good security feature of Firefox.

  • Problem invoking EJB from client

    I'm using J2EE 1.4 to package this application
    but I get an internal error when trying to call the servlet client
    here are the codes for the stateless Bean
    import java.util.*;
    import java.io.*;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    public class LoanBean implements SessionBean
    private javax.ejb.SessionContext m_ctx = null;
    public void setSessionContext(SessionContext ctx)
         m_ctx = ctx;
    public void ejbCreate() throws java.rmi.RemoteException,javax.ejb.CreateException
         System.out.println("ejbCreate() on obj" + this);
    public void ejbRemove()
         System.out.println("ejbRemove() on obj" + this);
    public void ejbActivate()
         System.out.println("ejbActivate() on obj" + this);
    public void ejbPassivate()
         System.out.println("ejbPassivate() on obj" + this);
    public float calculateInterest(float rate, float time, float amount)throws java.rmi.RemoteException
         float interest = time * amount * (rate/ 100);
         return interest;
    the code for the home interface
    import javax.ejb.EJBHome;
    public interface LoanHome extends EJBHome
         public Loan create() throws java.rmi.RemoteException,javax.ejb.CreateException;
    the code for the remote interface
    import javax.ejb.EJBObject;
    public interface Loan extends EJBObject
         public float calculateInterest(float rate, float time, float amount)throws java.rmi.RemoteException;
    and here is the code for my servlet client
    import java.io.*;
    import javax.servlet.*;
    import javax.naming.*;
    import javax.servlet.http.*;
    import javax.rmi.PortableRemoteObject;
    import javax.ejb.*;
    public class LoanServlet extends HttpServlet
         public void doGet(HttpServletRequest req, HttpServletResponse res)throws ServletException, IOException
              PrintWriter out = res.getWriter();
              res.setContentType("text/html");
              float rate = Float.valueOf(req.getParameter("rate")).floatValue();
              float time = Float.valueOf(req.getParameter("time")).floatValue();
              float amount = Float.valueOf(req.getParameter("amount")).floatValue();
              Loan myLoanRemote = null;
              LoanHome myLoanHome = null;
              InitialContext initCon = null;
              try
                   initCon = new InitialContext();
              catch(Exception e)
                   out.println("First" + e.toString());
              try
                   String JNDIName = "ejb/SimpleLoan";
                   Object obj = initCon.lookup(JNDIName);
                   myLoanHome = (LoanHome)PortableRemoteObject.narrow(obj, LoanHome.class);
              catch(Exception e)
                   out.println("Second" + e.toString());
              try
                   ****myLoanRemote = myLoanHome.create();
              catch(CreateException e)
                   out.println("Third" + e.toString());
              float interest = myLoanRemote.calculateInterest(rate, time, amount);
              out.println("<B> Interest : " + interest + " </B>");
    I get an internal error that points to the line with **** (that is line 40)
    help pls

    tried it but got this error
    java.lang.NullPointerException
         at LoanServlet.doGet(LoanServlet.java:40)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:748)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:289)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:205)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:283)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:102)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:192)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:156)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:569)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:261)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:215)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:156)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:569)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:200)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:156)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:180)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:582)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
         at com.sun.enterprise.webservice.EjbWebServiceValve.invoke(EjbWebServiceValve.java:134)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
         at com.sun.enterprise.security.web.SingleSignOn.invoke(SingleSignOn.java:254)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
         at com.sun.enterprise.web.VirtualServerValve.invoke(VirtualServerValve.java:209)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:569)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:161)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:156)
         at com.sun.enterprise.web.VirtualServerMappingValve.invoke(VirtualServerMappingValve.java:166)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:569)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:979)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:211)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:692)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:647)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:691)
         at java.lang.Thread.run(Thread.java:534)
    |#]

  • Finally.... Video captured from applet in Vista!!

    Hello!
    Hurray!! finally I can see myself smiling and waving back in browser in Vista.
    I mentioned in another thread just a day earlier that I will post a new topic if I succeed in capturing from applets in Vista, so thats what I am doing.... This thread is all about how achieved it.
    I have seen many posts mentioning problems in capturing from applets in vista. I was also one of the sufferer. And most people including me blamed that on restricted sandbox of Vista. But surprisingly it was all about classpath.
    I think I mentioned in some earlier thread that the 'Java console' shows the classpath to be *"{JREHOME}/classes"* instead of the classpath specified in CLASSPATH environment variable. You can check that by pressing 's' which *'dumps system and deployment properties'* in the Java Console. You can check the classpath by noting the value of *"java.class.path"* field which for my case was"C:\\PROGRA~1\\Java\\jre6\\classes". This turned out to be the main problem. The applet was not accessing any classes from the real CLASSPATH instead it was considering the classpath to be jrehome/classes. So, now I had enough hint what to do next. I simply created a folder 'classes' in {JREHOME} and copied the jmf registry files to that folder. By registry files I mean *'jmf.properties'* and *'jmf.properties.orig'* files in *'{JMF Install}/lib'* folder (actually i don't which among them has got some thing to do with the registry but I copied them both). So, after doing this, all my capture applets, whether signed or unsigned started running. Earlier they all were throwing *"java.lang.RuntimeException: No permission to capture from applets"* exception even after I have allowed capture from applets in JMF registry. That was perhaps not taking affect because of classpath issues. So, thats the story.... if someone faces the same problem he can use this workaround or you can say hack ;-)
    Some questions which can be asked from me would be:
    1- Did you set your CLASSPATH environment variable correctly?
    ans: Yes, infact all my jmf applications were running correctly, the problem was only with the applets.
    2- What classpath other systems (e.g. XP) mention in the Java console ?
    ans: surprisingly, the same classpath that Vista mentions i.e. {JREHOME}/classes. I tested on XP-SP3, but it supposedly had access to the real CLASSPATH also.
    3- Is this problem really Vista specific?
    ans: Can't say... but it can be. It maybe the case that Vista does not allow access to real CLASSPATH, but this problem can easily be my system specific, it would be called a general vista problem if this happens on all Vista systems, I need volunteers for this test. captfoss, can you please test this on your system? :)
    4- Is this problem JMF specific?
    ans: Chances are low. I am going to test this by making my own test library and adding it to classpath and then try to access it via applet. If this fails then this problem is not JMF specific.
    Drawbacks of this work around:
    1- This can be a pain for ordinary users , copying registry files from JMF/lib to JRE/classes.
    2- Whatever you change in JMF registry would not be effective to the applets. As the old registry files are to be replaced with new registry files every time JMF registry is changed for changes to take effect in applets.
    The real big question:
    How can we force Vista to look in the real CLASSPATH? this is the real question, if this can be done just by changing some settings then all this workaround is useless :) I am looking forward to the answer of this question.....
    captfoss, I would highly appreciate your comments.
    Thanks for reading this rather long post.... :)
    Thanks!

    A couple of comments here...the answer is, in fact, no, you didn't set your classpath correctly. One, you're probably using a JAR file to run your applet from (I'm not an applet programmer but I do believe that a JAR is required) which do not use the environment's classpath, they use their manifest classpath. No, the applet was not jared.
    Second, I believe that the browser itself specifies its own classpath, which you cannot modify. I believe this would be considered a security feature...Both IE7 and firefox3 fail.
    "You have little control over the CLASSPATH used by a browser for an Applet"
    [http://mindprod.com/jgloss/classpath.html]
    Ok this maybe the reason, I will go through the link....
    2- What classpath other systems (e.g. XP) mention in the Java console ?
    ans: surprisingly, the same classpath that Vista mentions i.e. {JREHOME}/classes. I tested on XP-SP3, but it supposedly had access to the real CLASSPATH also. There isn't a "real" CLASSPATH, there is just the classpath stored as an environmental variable. It's no more or less real than the one in the browser.Thats what I thought.... but I think {JREHOME}/classes is the default class path used by the jre whether we set any CLASSPATH variable or not it would be there, something of that sort.....
    Lots of possibilities, but my best guess is that Vista doesn't let code running in the browser read environmental variables.Yes, I fully agree with this. I think I should file a bug report.
    4- Is this problem JMF specific?
    ans: Chances are low. I am going to test this by making my own test library and adding it to classpath and then try to access it via applet. If this fails then this problem is not JMF specific. Definately not. It would apply to any code that wants to access something on the classpath. You are right... as I said I would test it, I tested by making a small library, added it to classpath, made an application and an applet. As expected, the aplication worked while the applet failed.
    Any application with a custom classpath would be affected.I don't understand what you mean here, do you mean 'Class-path' header in jar manifest?
    I like the "installation requirement" part. I'd suggest looking into that. Alternately, there may be something in the security settings to allow access to environmental variables.I will try to look into both.
    I just tried this statement in applet:
    System.out.println( System.getProperty( "java.class.path" ) );It threw this exception:
    Exception: java.security.AccessControlException: access denied (java.util.PropertyPermission java.class.path read)
    I don't know what conclusion should I draw from this... this does mean applet has no right to know what the classpath is.... but this doesn't mean even jre plugin responsible for running applet does not know what the classpath is :)
    Finally, I want to say that due to some problems I could not post earlier, and I may not post for few more days. But I appreciate your comments and would appreciate more of them.
    Thanks!

  • Problem with accessing Signed Applet from javascript method

    Hi,
    I am facing the following problem while accessing Signed Applet from javascript method.
    java.security.AccessControlException: access denied (java.io.FilePermission c:/temp.txt read)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at FileTest.testPerm(FileTest.java:19)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at sun.plugin.javascript.invoke.JSInvoke.invoke(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at sun.plugin.javascript.JSClassLoader.invoke(Unknown Source)
         at sun.plugin.com.MethodDispatcher.invoke(Unknown Source)
         at sun.plugin.com.DispatchImpl.invokeImpl(Unknown Source)
         at sun.plugin.com.DispatchImpl$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.plugin.com.DispatchImpl.invoke(Unknown Source)
    I am using jdk1.5 for my development...
    Can anyone help to resolve this security issue. Urgent...
    Thanks in advance.

    Hey thanks. I wasn't able to get it to work with that sample but I did find this very similar code that does allow javascript to call JFileChooser in an applets public method.
    java.security.AccessController.doPrivileged(
    new java.security.PrivilegedAction()
    public Object run(){                           
    //do your special code here
    return null; //return whatever you want
    It seems a bit tempermental in that if you don't select a file quickly, it will hang the browser....no perfect solution but I'm going in the right direction.
    Thanks,
    Scott

  • IIS, Javascript, Signed Applet and ASP Blank Page Problem

    Hi,
    I'm having a problem using a Signed Applet in a site that runs in a IIS (Windows Server 2003).
    My aspx web page uses the applet to read my smart card and get information from it.
    This applet uses an auxiliar dll (stored in a second Signed Jar file) in order to read the information from my smart card.
    The way the solution is design:
    1) Aspx page is asked from server
    2) Internet Explorer recieve the page and asks the server for it content (images, applet, javascripts, etc)
    3) After this the JVM runs (console opens)
    4) After the Aspx page render fully a javascript register onload fires and call an applet method
    5) Applet receive the call and run the logic of the method:
         - reads the smart card;
         - calls Javascript function in order to fill aspx fields with information from smart card
         - calls Javascript function the simulates a click in a botton of aspx page (in order to call server side part sending data readed from smart card to server)
    5) The server makes some logic with the information receive and responds to client registering in aspx page a call to another Javascrit function
    6) The client received the asnwer from server and runs the Javascript function registered on step 5)
         This Javascript calls another method from applet and runs the following logic:
         - reads more information from smart card;
         - call javascript function in order to fill more fields of aspx page with the information readed
         - calls Javascript function the simulates a click in a botton of aspx page (in order to call server side part sending data readed from smart card to server)
    7) The server makes some logic and call another pages with no Applets
    8) Client asks for a second page with the same applet and we start with another logic express on steps 1);2);3),4);5) and then 7).
    This is all ok, until sometimes the server stop responding correcly for requests regarding this two pages with the Applet.
    When this happens the server just responds with a blank page.
         - with fiddler I can seer the request for the aspx page (that uses the applet)
         - but server responds with a blank html page
    The JVM doesn't fire.
    The IIS log don't show errors.
    The eventviewer doesn't show errors.
    The problem is solved with an IIS reset or a Application Pool reset.
    After a while the problem returns.
    This problem occours for other user in another machine, the server just stops responding correcly to request regarding pages with applets, the other pages still continue to work.
    If we disable Java Control Panel->Advanced->Java Plug-in->Enable the next-generation Java Plug-in the problem seend to stop, but we can't force all clients to disable this option right?
    Or there is a way to force the Applet to run with this option disabled?
    As anyone experience similar problem?
    Regards,
    OF

    This is all ok, until sometimes the server stop responding correcly for requests regarding this two pages with the Applet.
    When this happens the server just responds with a blank page.
    - with fiddler I can seer the request for the aspx page (that uses the applet)
    - but server responds with a blank html pageWell, if http requests look identical in case of success and failure (pay attention to cookies, etc) then it has to be something on the server side.
    It could be that server gets into this wrong state because of previous requests made by applet but it is hard to tell.
    I am not clear how old/new plugin can make a difference unless your applets run in the legacy mode (i.e. you are actually trying to reuse SAME instance of the applet when
    it is loaded next time).
    I'd start with
    1) carefully comparing good/bad sessions
    2) checking whether server will serve correct response to another client when it serves "bad" page for current client
    3) add debug statements to aspx - it is scripted page, may be some condition is not met and then it returns blank?
    4) record all http requests in one session until you get to "error" state and then use any http server testing tool to "replay" this set of requests.
    You should be able to get server into the same state without use of applet. Then you can try to tweak set of requests to see what makes a difference.

  • Problems invoking a method from a web service

    Am using netbeans 6.1 and my problem is when i invoke a method from a web service that has a custom class as a return type.
    When I debug the client that consumes my web service, It get Stack in this line:
    com.webservice.WebServiceInfoBean result = port.getWebServiceInfo(nameSpace, serviceName, portName, wsdlURL);
    i don't get any error on the console.
        static public void function1() {
            try { // Call Web Service Operation
                com.webservice.WebServiceMonitorService service = new com.webservice.WebServiceMonitorService();
                com.webservice.WebServiceMonitor port = service.getWebServiceMonitorPort();
                // TODO initialize WS operation arguments here
                java.lang.String nameSpace = "NameSpaceHere";
                java.lang.String serviceName = "WebServicePrueba";
                java.lang.String portName = "Soap";
                java.lang.String wsdlURL = "http://localhost/Prueba/WebServicePrueba.asmx?wsdl";
                // TODO process result here
                com.webservice.WebServiceInfoBean result = port.getWebServiceInfo(nameSpace, serviceName, portName, wsdlURL); // <--- here it stack
                System.out.println("getWebServiceInfo");
                Iterator i = result.getMethods().iterator();
                while (i.hasNext()) {
                    MethodBean method = (MethodBean) i.next();
                    System.out.print("Nombre: " + method.getname());
                    System.out.print(" Returns: " + method.getreturnType());
                    Iterator j = method.getparameters().iterator();
                    while (j.hasNext()) {
                        ParameterBean parameter = (ParameterBean) j.next();
                        System.out.print(" ParameterName: " + parameter.getname());
                        System.out.print(" ParameterType: " + parameter.gettype());
                    System.out.print("\n");
                    System.out.print(method.getfirma());
                    System.out.print("\n");
                    System.out.print("\n");
            } catch (Exception ex) {
                ex.printStackTrace();
        }Web Service side
         * Web service operation
        @WebMethod(operationName = "getWebServiceInfo")
        public WebServiceInfoBean getWebServiceInfo(@WebParam(name = "nameSpace")
        String nameSpace, @WebParam(name = "portName")
        String portName, @WebParam(name = "serviceName")
        String serviceName, @WebParam(name = "wsdlURL")
        String wsdlURL) throws Throwable {
            //TODO write your implementation code here:
            webservicemonitor instance = new webservicemonitor();
            return instance.getWebServiceInfo(nameSpace, serviceName, portName, wsdlURL);
        }I have tested my internal code from the web service side and everything works fine. The problem occurs when i invoke it from a client side. probably I did not made the right serialization form my class WebServiceInfoBean? or am missing something. here it is:
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package com.beans;
    import java.util.ArrayList;
    * @author Tequila_Burp
    public class WebServiceInfoBean implements java.io.Serializable {
         * Holds value of property wsdlURL.
        private String wsdlURL;
         * Getter for property wsdlURL.
         * @return Value of property wsdlURL.
        public String getwsdlURL() {
            return this.wsdlURL;
         * Setter for property wsdlURL.
         * @param wsdlURL New value of property wsdlURL.
        public void setwsdlURL(String wsdlURL) {
            this.wsdlURL = wsdlURL;
         * Holds value of property namespace.
        private String namespace;
         * Getter for property namespace.
         * @return Value of property namespace.
        public String getnamespace() {
            return this.namespace;
         * Setter for property namespace.
         * @param namespace New value of property namespace.
        public void setnamespace(String namespace) {
            this.namespace = namespace;
         * Holds value of property serviceName.
        private String serviceName;
         * Getter for property serviceName.
         * @return Value of property serviceName.
        public String getserviceName() {
            return this.serviceName;
         * Setter for property serviceName.
         * @param serviceName New value of property serviceName.
        public void setserviceName(String serviceName) {
            this.serviceName = serviceName;
         * Holds value of property wsdlURL.
        private String portName;
         * Getter for property wsdlURL.
         * @return Value of property wsdlURL.
        public String getportName() {
            return this.portName;
         * Setter for property wsdlURL.
         * @param wsdlURL New value of property wsdlURL.
        public void setportName(String portName) {
            this.portName = portName;
         * Holds value of property methods.
        private ArrayList methods = new ArrayList();
         * Getter for property methods.
         * @return Value of property methods.
        public ArrayList getmethods() {
            return this.methods;
         * Setter for property methods.
         * @param methods New value of property methods.
        public void setmethods(ArrayList methods) {
            this.methods = methods;
        public MethodBean getMethod(int i) {
            return (MethodBean)methods.get(i);
    }by the way, everything has been worked on the same PC.

    Hi Paul,
    This sound familiar, but I cannot at the moment locate a reference to
    the issue. I would encourage you to seek the help of our super support
    team [1].
    Regards,
    Bruce
    [1]
    http://support.bea.com
    [email protected]
    Paul Merrigan wrote:
    >
    I'm trying to invoke a secure 8.1 web service from a 6.1 client application and keep getting rejected with the following message:
    Security Violation: User: '<anonymous>' has insufficient permission to access EJB:
    In the 6.1 client, I've established a WebServiceProxy and set the userName and password to the proper values, but I can't seem to get past the security.
    If there something special I need to do on either the 8.1 securing side or on the 6.1 accessing side to make this work?
    Any help would be GREATLY appreciated.

  • Calling javascript from swf (which is source file of frame) - problems with OPERA

    hey,
    right now i have the swf-file as the source file for a frame,
    because i want the swf-width depend on the browser-size.
    it looks kinda like this:
    <frameset cols="10,*,10">
    <frame src="border.htm" name="leftFrame">
    <frame src="file.swf" name="mainFrame">
    <frame src="border.htm" name="rightFrame">
    </frameset>
    from the swf i call a javascript-code that is located in the
    'border.htm'
    file.
    the javascript simply opens a popup window.
    function open_popup() {
    MM_openBrWindow('popup.htm','pop','toolbar=no,location=no,status=no,menubar=no,scrollbars =no,resizable=no,width=400,height=500');}everything
    works fine ine firefox, ie, netscape (at least in another tab),but
    when it comes to the opera browser (and apparently also safari)i
    don't get any reaction at all ...i told opera to allow
    popup-windows, so that shouldnt be the reason.now i am thinking
    maybe some browsers have a problem with callingjavascripts from
    within swfs that are not located in that specifichtml-file?maybe
    some of you encountered the same problem ...would be grateful for
    any advices ...thanx,eva

    hey,
    right now i have the swf-file as the source file for a frame,
    because i want the swf-width depend on the browser-size.
    it looks kinda like this:
    <frameset cols="10,*,10">
    <frame src="border.htm" name="leftFrame">
    <frame src="file.swf" name="mainFrame">
    <frame src="border.htm" name="rightFrame">
    </frameset>
    from the swf i call a javascript-code that is located in the
    'border.htm'
    file.
    the javascript simply opens a popup window.
    function open_popup() {
    MM_openBrWindow('popup.htm','pop','toolbar=no,location=no,status=no,menubar=no,scrollbars =no,resizable=no,width=400,height=500');}everything
    works fine ine firefox, ie, netscape (at least in another tab),but
    when it comes to the opera browser (and apparently also safari)i
    don't get any reaction at all ...i told opera to allow
    popup-windows, so that shouldnt be the reason.now i am thinking
    maybe some browsers have a problem with callingjavascripts from
    within swfs that are not located in that specifichtml-file?maybe
    some of you encountered the same problem ...would be grateful for
    any advices ...thanx,eva

  • How to pass parameter from javascript to applet ?

    i have some parameters from form in html,
    and i would like to pass from javascript to an applet,
    (which a type of calling method in applet from javascript)
    and get back data from applet to display in html
    how could i do this ?

    in my program,
    i pass 3 string to the applet
    var reply = document.test.called(ft, fc, tc)
    in the fucntion "called" in the "test" applet
    i simply test it by
    public String called(String l, String from, String to){
    return "abcd";
    but the result should the value return is "1"
    can anyone help me ?

  • Calling javascript function from applet

    Can anyone pl help me with the syntax for calling a javascript function from applet.
    Thanx.

    Try this url:
    http://www.inquiry.com/techtips/java_pro/10MinuteSolutions/callingJavaScript.asp
    It also provides some examples.

  • Problem invoking UCM 11g Web services from ODI 11g

    We have a running UCM 11g instance with its web services (GenericRequest) properly configurated.
    The wsdl is published in the url http://ucmt:16200/idcws/GenericSoapPort?WSDL and reacheble from any web browser.
    The service can be easily invoked from external applications such as soapUI 4.5.1 returning the correct SOAP response. Here is a sample request returning correct results:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ucm="http://www.oracle.com/UCM">
    <soapenv:Header/>
    <soapenv:Body>
    <ucm:GenericRequest webKey="cs">
    <ucm:Service IdcService="DOC_INFO">
    <ucm:User></ucm:User>
    <ucm:Document><ucm:Field name="dID">27099</ucm:Field></ucm:Document>
    </ucm:Service>
    </ucm:GenericRequest>
    </soapenv:Body>
    </soapenv:Envelope>
    The problem occurs when we invoke it from the ODI assistant, when we type the WSDL URL and click in "Connect to WSDL" button,
    we get the following error in the middle pane : Invalid Request : java.lang.NullPointerException+
    The port combo and the operation pane are correctly populated
    UCM version is: 11gR1-11.1.1.6.0-idcprod1-121115T130554 (Versión Interna:7.3.3.183)
    ODI version is: 11.1.1.6.0
    Java(TM) Platform     1.6.0_30

    I would suggest contacting support channel to analyze such NPE if there is a product bug causing it.

Maybe you are looking for

  • TS3694 I get an Error 7 on Microsoft Home Edition 7 telling me iTunes did not properly install

    I keep getting an Error 7 on Microsoft Home Edition 7 telling me iTunes did not properly install.

  • Help! First Play Woes DVDSP4 confused non-newbie

    I thank you if you are able to shed some light on this. We have made many discs with a first play track, logos, legal etc. All work fine but our most recent project is not, for no reason we can see. We have a 30sec video as the first play, before goi

  • Service completion indicator

    Dear Experts, I know there is the field for Delivery completion Indicator for std PO's.. After that we cannot receive any further materials against that PO. (Delivery Tab).. But for Service PO.. the delivery completion indicator is not avl.. please l

  • IDOC_OUTPUT_ORDRSP - Multiple Issue Output

    Hi All, I have problem issuing multiple output for a Sales order Confirmation. BA00 is configured as: 1> I have assigned reqmnt 2 to the output BA00 2> Multiple Issue flag is checked 3> In Change Section, I have assigned FORM ZZ_ITEM_CHECK for progra

  • Selecting (checking boxes) within Library in iTunes

    Is there a quick way to select or deselect (checking boxes) within your library (or specific playlist) as a means to control the items that you want to move to the ipod? Usually in a similar environment, you have an option to select all of the boxes