JSP Plugin tag for applets with codebase - WLS 6.1 sp2

          Could someone please tell me what I am doing wrong?
          I have the following Plugin tag in my JSP.
          <jsp:plugin type="applet"
          code="com.xxx.efm.frontend.view.EFMApplet"
          codebase="/lib"
          archive="applets/EFMFrontend.jar, EfmCommon.jar, TrimmedWeblogic.jar, dom4j-full.jar,
          /classes/"
          jreversion="1.3"
          nspluginurl="http://java.sun.com/products/plugin/1.3/plugin-install.html"
          iepluginurl="http://java.sun.com/products/plugin/1.3/jinstall-131-win32.cab">
               <jsp:params>
                    <jsp:param name="Delimiter" value="<%=delimiter%>" />
                    <jsp:param name="ComponentMap" value="<%=componentMapValues%>" />
                    <jsp:param name="ServerConfig" value="<%=serverConfigValues%>" />
                    <jsp:param name="GUIConfig" value="<%=guiConfigValues%>" />
               </jsp:params>
          </jsp:plugin>
          I am trying to load the JSP using Netscape 4.7. When I don't have a plug-in installed
          the page
          displays "Click here to get the plugin". On clicking on it the browser pops up
          a "Plugin not loaded" dialog.
          All this is fine except that the dialog says it can retrieve the plugin from "/lib".
          When I click on
          "Get the plugin" button the new browser window tries to load the URL: http://localhost:2002/lib/?application/x-java-applet;version=1.3.
          It totally ignores the netscape URL for plugin. Something similar happens with
          IE as well.
          I tried the same JSP without the codebase tag and all worked fine (except for
          my applets). Yeah, I can append a "/lib" to each of
          my jars in my archive and it just might work. But should I be doing anything different?.
          Any help is appreciated.
          Thanks,
          Gopal
          

I am facing the same problem with netscape (4.7x). Gopal, did you find any
          solution?
          IE works fine for me. I use the foll pluginurl
          iepluginurl="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#V
          ersion=1,3,1,1"
          _Jp
          "Gopal" <[email protected]> wrote in message
          news:[email protected]...
          >
          > Could someone please tell me what I am doing wrong?
          >
          > I have the following Plugin tag in my JSP.
          >
          > <jsp:plugin type="applet"
          > code="com.xxx.efm.frontend.view.EFMApplet"
          > codebase="/lib"
          > archive="applets/EFMFrontend.jar, EfmCommon.jar,
          TrimmedWeblogic.jar, dom4j-full.jar,
          > /classes/"
          > jreversion="1.3"
          >
          nspluginurl="http://java.sun.com/products/plugin/1.3/plugin-install.html"
          >
          iepluginurl="http://java.sun.com/products/plugin/1.3/jinstall-131-win32.cab"
          >
          >
          > <jsp:params>
          > <jsp:param name="Delimiter" value="<%=delimiter%>" />
          > <jsp:param name="ComponentMap" value="<%=componentMapValues%>" />
          > <jsp:param name="ServerConfig" value="<%=serverConfigValues%>" />
          > <jsp:param name="GUIConfig" value="<%=guiConfigValues%>" />
          > </jsp:params>
          > </jsp:plugin>
          >
          > I am trying to load the JSP using Netscape 4.7. When I don't have a
          plug-in installed
          > the page
          > displays "Click here to get the plugin". On clicking on it the browser
          pops up
          > a "Plugin not loaded" dialog.
          > All this is fine except that the dialog says it can retrieve the plugin
          from "/lib".
          > When I click on
          > "Get the plugin" button the new browser window tries to load the URL:
          http://localhost:2002/lib/?application/x-java-applet;version=1.3.
          > It totally ignores the netscape URL for plugin. Something similar happens
          with
          > IE as well.
          >
          > I tried the same JSP without the codebase tag and all worked fine (except
          for
          > my applets). Yeah, I can append a "/lib" to each of
          > my jars in my archive and it just might work. But should I be doing
          anything different?.
          > Any help is appreciated.
          >
          > Thanks,
          > Gopal
          

Similar Messages

  • JSP plugin call for applet

    How do I call an applet with the JSP plugin call? The applet works OK when called from an HTML file. However, when called from a JSP file, the applet is not found.
    Here's the code:
    <jsp:plugin type="applet" code="SelectList.class" codebase="applet"
    archive="bc4jhtml.jar,datatags.jar,uixtags.jar,bc4juixtags.jar,ojsp.jar,ojsputil.jar,oc4j.jar,servlet.jar,ojc.jar,xmlparserv2.jar,regexp.jar,share.jar,uix2.jar,xmlcomp.jar,jdevrt.jar,runtime12.jar,bc4jmt.jar,collections.jar,bc4jct.jar,jndi.jar,classes12.jar,nls_charset12.jar,bc4jimdomains.jar,ordim.jar,ordhttp.jar,jdevcm.jar,bc4jdomorcl.jar,bc4jdatum.jar,activation.jar,jcert.jar,jnet.jar,jta.jar,mail.jar,ejb.jar,jaxp.jar,jdbc.jar,jaas.jar,jsse.jar,bc4jui.jar,bigraphbean.jar,LW_PfjBean.jar"
    jreversion="1.2" width="1000" height="360" >
    <jsp:params>
    <jsp:param name="test" value="This is a test." />
    </jsp:params>
    <jsp:fallback>
    You need to install the Java plugin on your web browser to run this applet.
    </jsp:fallback>
    </jsp:plugin>

    You really don't need to put all the jar files in your archive list.
    Most likely, you just need to put the jar that contains the applet.
    And, few more dependencies jar files.
    Here is some sample code for your reference:
    <jsp:plugin type="applet" code="Clock2.class" codebase="applet" jreversion="1.2"
    width="160" height="150" >
    <jsp:fallback>
    Plugin tag OBJECT or EMBED not supported by browser.
    </jsp:fallback>
    </jsp:plugin>
    code attribute points to a class file "Clock2.class"
    under the directory under codebase attribute "applet"
    You may want to take a look into the HTML / JSP document about
    how the plugin tag works in HTML / JSP.

  • Displaying Applet in JSP Using jsp:plugin tag

    The following code is not working eventhough i downloaded to JRE plug-in .Please help me to work the
    following code in JSP.
    <jsp:plugin code="mani.Clock2.class"
    codebase="/classes/" width=300 height=300
    jreversion="1.3"
    nspluginurl="http://java.sun.com/products/plugin/1.1.3/plugin-install.html"
    iepluginurl="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0">
    <jsp:fallback>
    <font color=#FF0000 size=10>Sorry Error While Loading Applet </font>
    </jsp:fallback>
    </jsp:plugin>

    why don't ypu just use the <applet> tag?

  • Is Tomcat 4's jsp:plugin tag hardwired to 1.2?

    Is Tomcat 4's <jsp:plugin > tag hardwired to version 1.2 of the JPI?
    I was absolutely horrified today at a job interview when, proudly navigating to the page containing the 1.4-demanding applet I embedded in the page using <jsp:plugin ...> the plugin installation dialogue came up -- asking whether they wanted to install the 1.2 plugin (up until recently, I had the applet's object tag embedded manually... switching to jsp:plugin was fairly recent).
    As it turns out, the <object> tag generated by Tomcat was specifying the download path for the 1.2 plugin, even though I specified jreversion="1.4" in the <jsp:plugin> tag:
    <OBJECT
       classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
       name="theApplet"
       width="550" 
       height="400" 
       align="middle" 
       codebase="http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#Version=1,2,2,0">The "clsid" value can be changed in web.xml by changing the jsp servlet's "ieClassId" initParam, but as far as I can tell there's NO mechanism for changing the "codebase" value anywhere.
    Is the <jsp:plugin> tag (under Tomcat 4, at least) just useless for Applets that must have 1.4, or is there a configuration parameter somewhere to set the "codebase" value generated by the tag?
    I know I could always put the manually-specified code back in, but I'd prefer to stay with the <jsp:plugin> tag if possible just because it makes the jsp source cleaner. What's strange is that nobody seems to have complained about that problem on the usual places (Usenet/dejanews/Google, jguru.com, etc). Whether that's just because nobody writes applets that actually demand 1.4, or whether everybody who does just embeds the <object> tag manually, I'm not sure.
    In any case, I'm trying to figure out how to make <jsp:plugin> generate the right HTML for 1.4-using applets... or whether it's even possible.

    Sigh. I found it. It's actually specified as the "iepluginurl" property of the <jsp:plugin> tag.
    <emotion:frustration variation="anger">
    Now I just need to figure out what *$%!# value to use for it.
    The JPI's developer guide has to be the worst document I've ever seen from Sun. Normally, Sun's documents are good. Often, exceptionally so. But the JPI guide... well, after reading http://java.sun.com/j2se/1.4.1/docs/guide/plugin/developer_guide/using_tags.html multiple times, I'm still not sure what #$%^&* URL corresponds to "The newest released JPI equal to or newer than 1.4.0". The only URL on the whole page that they even imply works is hardwired to 1.4.0, and in the same breath they imply that every other codebase URL on the page is wrong, hypothetical, and shouldn't be used... oh, and for that matter, the 1.4_0 one shouldn't really be used ether, because it might change in the future. Grrrrr.
    If there's a pattern to the following URLs (all used on the same page) that's supposed to illustrate something besides abyssmally bad editing and apparent indecision, I haven't seen it yet:
    http://java.sun.com/products/plugin/autodl/jinstall-1_4-windows-i586.cab#Version=1,4,0,0
    http://java.sun.com/products/plugin/1.4/jinstall-14-win32.cab#Version=1,4,0,mn
    http://java.sun.com/products/plugin/autodl/jinstall-1_4-windows-i586.cab#Version=1,4,1,mn
    http://java.sun.com/products/plugin/autodl/jinstall-1_4_0-win.cabHmmm. Let's see here. They're all the same up to http://java.sun.com/products/plugin, but from that point one diverges into /1.4/, while the others continue into /autodl/. But even past that point, two imply that the filename follows the pattern jinstall-1_4-windows-i586.cab#Version=1,4,x,* ... but whether developers who really, truly, don't care about the specific maintenance release should use "0" or "mn" is left up in the air.
    Furthermore, the ONE URL on the entire page that they come halfway close to implying will work is the last one I listed above, which itself goes totally against whatever hypthetical pattern they were trying to imply with the other three. For now I'll probably stick the last one listed as the parameter because it's the only one they actually come out and say will work, but I suspect the first one is probably the "right" one.
    Of course, there's always the matter of Macintosh users running IE. Or Windows users running Mozilla (which is technically Netscape, but uses MSIE ActiveX plugins). Does Mozilla get fed the value of "iepluginurl", or the value of "nspluginurl"? Sigh.
    </emotion:frustration>

  • Weired behavior of jsp:plugin tag

    Hi.
    When I use <jsp:plugin type="applet".....></jsp:plugin> tag, jsp page shows a applet correctly in IE but not in mozilla(1.7). I've tried to solve this problem and found that if I use <applet></applet> tag it works fine both of them.
    Does anyone have idea? the reason of this, and isn't there anyway to use jps:plugin tag to work correctly in both browers?

    What version of Jdk are you using? The Java plugin is not consistent across browsers and browser versions.
    The jsp:plugin tag gets coverted to the OBJECT tag after compliation.
    Just go through this page to find out which tag suits your need.
    http://java.sun.com/products/plugin/versions.html
    This link might also be helpful to you.
    http://www.mail-archive.com/[email protected]/msg32719.html

  • How can I return some values from an applet invoked by jsp:plugin tag

    My JSP is something like that:
    <html>
         <head>
                 <title> . . . </title>
         </head>
         <script>
              function getValueFromApplet()
                   var src = document.pinApplet.checkPin();
                   document.myForm.j_username.value = document.pinApplet.tokenizeName(src);
                   alert(document.myForm.j_username.value);
                   document.myForm.j_password.value = document.pinApplet.tokenizePassword(src);
                   alert(document.myForm.j_password.value);
         </script>
            <body>
                    <jsp:plugin type="applet"
                          code="PinApplet.class"
                       codebase="/idp"
                       name="pinApplet"
                                width="300"
                                height="300">
                         <jsp:fallback> Authentication Form is not supported by the browser </jsp:fallback>
              </jsp:plugin>
                    <form action="https://xxx.xxx.xxx"
                   name="myForm"
                   method="post" onSubmit="return getValueFromApplet()">
              <table>
                   <td><input type="submit" value="OK" >
                   <td><input type="hidden" id="j_username" name="j_username" value=""></td>
                   <td><input type="hidden" id="j_password" name="j_password" value=""></td>
              </table>
              </form>
         </body>checkPin() returns "alice--alice"
    tokenizeName() returns the first token: alice
    tokenizePassword() returns the second token: alice
    When I test the applet in the IDE, it returns the values properly, but not in the JSP invokation.

    evnafets wrote:
    javascript will not be executing on the server. You can rule that one out.
    Is your Applet being initialised correctly?
    Where have you got the classes for it? I think the applet doesn't need any kind of initialization, because it doesn't have any variables and all the process is made in the method called by onsubmit()
    The applet is composed only by one class and I'm totally sure that the class is placed in the correct place.
    evnafets wrote:
    I would say put in a couple more alerts - one before the call to the applet, one after.
    put some logging statements in your applet to see if it gets there.In the javascript, there are two alerts between the three calls to the applet. Where do you advise me to put more alerts?
    I don't understand what do you refer when you say "logging statements"
    I am going to test again the call to the applet in order to find some kind of code that can be invalid or that can make the function to "crash"

  • Expressions not evaluating properly in jsp:plugin tag

    Hi there, running OC4J as Oracle9iAS (1.0.2.2.1)
    In the JSP1.1 spec dynamic expressions in the jsp:plugin <param> tag are clearly specified as below:
    <jsp:params>
    [ <jsp:param name="parameterName" value="{parameterValue | <%= expression %>}" /> ]+ </jsp:params>
    Unfortunately, attempting this in OC4J, the expression is simply displayed as a static String, for example the following JSP source:
         <jsp:params>
              <jsp:param name="rootSubAssembly" value="<%=rootSubAssembly%>" />
         </jsp:params>
    Would output "<%=rootSubAssembly%>" as the parameter value, rather than the dynamic value specified in the JSP above.
    Any ideas? We'd like to benefit from using the plugin tag over object/applet if at all possible.

    Hi there, running OC4J as Oracle9iAS (1.0.2.2.1)
    In the JSP1.1 spec dynamic expressions in the jsp:plugin <param> tag are clearly specified as below:
    <jsp:params>
    [ <jsp:param name="parameterName" value="{parameterValue | <%= expression %>}" /> ]+ </jsp:params>
    Unfortunately, attempting this in OC4J, the expression is simply displayed as a static String, for example the following JSP source:
         <jsp:params>
              <jsp:param name="rootSubAssembly" value="<%=rootSubAssembly%>" />
         </jsp:params>
    Would output "<%=rootSubAssembly%>" as the parameter value, rather than the dynamic value specified in the JSP above.
    Any ideas? We'd like to benefit from using the plugin tag over object/applet if at all possible.

  • Is the jsp:plugin tag supported in Weblogic 5.1?

    I am running Weblogic 5.1 and I can't get the <jsp:pluging> tag to work.
              The server is not even translating the tag to anything usefull. When I do a
              'View Source' in the browser, the tag is exactly as I wrote it in the page.
              Is this feature supported in 5.1. I've tried the phonebook example and it
              doesn't work either. All my other JSP pages work just fine.
              Any help would be appreciated...
              Steven Carter
              Senior Software Developer
              VideoSpheres Inc.
              Office: 613-270-9646 Ext. 3025
              FAX: 613-271-9442
              e-mail:[email protected]
              

    Thanks for your response! Yes it was a typo in the message :). Would you have any idea why it is not working for me? Any special configuration required? A property I don't have correctly set in the properties file? I've tried the phonebook example shipped with the product and it doesn't work.
              "Kumar Allamraju" <[email protected]> wrote in message news:[email protected]..
              I never tested it myself. But i think we do support
              in 5.1 . Shouldn't it be <jsp:plugin>
              Was it a typo?
              Steven Carter wrote:
              I am running Weblogic 5.1 and I can't get the <jsp:pluging> tag to work.
              The server is not even translating the tag to anything usefull. When I do a
              'View Source' in the browser, the tag is exactly as I wrote it in the page.
              Is this feature supported in 5.1. I've tried the phonebook example and it
              doesn't work either. All my other JSP pages work just fine.
              Any help would be appreciated...
              Steven Carter
              Senior Software Developer
              VideoSpheres Inc.
              Office: 613-270-9646 Ext. 3025
              FAX: 613-271-9442
              e-mail:[email protected]
              [att1.html]
              

  • URGENT Help for applet with JAR file in Netscape

    I am having Applet with few classes
    Html is in /www directory
    and all class files are in /www/javaclassfiles
    I jared all javaclassfiles with following command
    c:\www\javaclassfiles>jar -cvf sample.jar TaxPaymentAppletForm.class *.class
    where sample.jar is my jar file and TaxPaymentAppletForm.class is the main applet class file.
    THEN I DELETED ALL CLASS FILES & KEPT ONLY SAMPLE.JAR FILE ON SERVER
    My html code is like below:
    <APPLET CODE="TaxPaymentAppletForm" ARCHIVE="sample.jar" CODEBASE="JavaClassFiles" WIDTH=460 HEIGHT=400></APPLET>
    The things are running on IE properly, but not on Netscape. Netscape is giving following error :
    java.io.IOException: <null>
    at netscape.net.URLConnection.connect(Compiled Code)
    at netscape.net.URLConnection.getInputStream(Compiled Code)
    * at netscape.applet.AppletClassLoader.grabArchiveFile(Compiled Code)
    at netscape.applet.AppletClassLoader.openArchive(Compiled Code)
    at netscape.applet.AppletClassLoader.openArchive(Compiled Code)
    at netscape.applet.AppletClassLoader.<init>(Compiled Code)
    at netscape.applet.AppletClassLoader.getClassLoader(Compiled Code)
    at netscape.applet.DerivedAppletFrame$LoadAppletEvent.dispatch(Compiled Code)
    at java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled Code)
    at java.awt.EventDispatchThread.run(Compiled Code)
    at netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run(Compiled Code)
    # Unable to load archive http://nearbuy_server:90/iras/JavaClassFiles/sample.jar: java.io.IOException: <null>
    # Applet exception: class TaxPaymentAppletForm could not be loaded
    # Applet exception: class TaxPaymentAppletForm could not be loaded
    # Applet exception: class TaxPaymentAppletForm could not be loaded
    In netscape also it is sometimes running some times not, without any logical reson.
    Any help regarding this is appreciated
    manisha

    Following is the more detailed analysis when applet is running and when not
    On local server, it is running fine on both IE / Netscape
    When I transfered jar file to live server
    On IE it is running for the first time and then onwards not running, If I clear the catch then again applet is running.
    For second time it is giving following error :
    IOException Loading Archive: http://dev1.janusx-collections.com/iras/JavaClassFiles/AppletForm.jar
    java.io.IOException: dev1.janusx-collections.com:80//iras/JavaClassFiles/AppletForm.jar
    at com/ms/net/wininet/http/HttpInputStream.connect
    at com/ms/net/wininet/http/HttpInputStream.<init>
    at com/ms/net/wininet/http/HttpURLConnection.createInputStream
    at com/ms/net/wininet/WininetURLConnection.getInputStream
    at com/ms/vm/loader/JarArchiveSet.loadNextJar
    at com/ms/vm/loader/JarArchiveSet.getResourceBits
    at com/ms/vm/loader/JarArchiveSet.getClassData
    at com/ms/vm/loader/ResourceLoader.getClassData
    at com/ms/vm/loader/URLClassLoader.findClass
    at com/ms/vm/loader/URLClassLoader.loadClass
    at com/ms/vm/loader/URLClassLoader.loadClass
    at com/ms/applet/AppletPanel.processSentEvent
    at com/ms/applet/AppletPanel.processSentEvent
    at com/ms/applet/AppletPanel.run
    at java/lang/Thread.run
    java.lang.ClassNotFoundException: TaxPaymentAppletForm
    at com/ms/vm/loader/URLClassLoader.loadClass
    at com/ms/vm/loader/URLClassLoader.loadClass
    at com/ms/applet/AppletPanel.processSentEvent
    at com/ms/applet/AppletPanel.processSentEvent
    at com/ms/applet/AppletPanel.run
    at java/lang/Thread.run
    ON Netscape it is NOT running at all on from live server and error is as given in above first post.
    manisha

  • Serving applets with ClassPathServlet on weblogic 6 sp2

    hi,
    i'm trying to load an applet from a jsp file using the <jsp:plugin ....
    tag
    it works fine when i don't use codebase and the applet class is in the same
    directory as the jsp file.
    but when i put the applet class in WEB-INF/classes and use
    codebase="./classes" i get the following exception
    Opening http://localhost:7001/sample/classes/SampleApplet.class with cookie
    "JSESSIONID=OyTn8rKuaBWh27ZhpDL5mzxY8biDLgRAZDOA2Zg8w8kmo4196Pwy!47472665222
    44203586!168453146!7001!7002".
    java.lang.ClassFormatError: SampleApplet (Bad magic number)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at sun.applet.AppletClassLoader.findClass(Unknown Source)
    at sun.plugin.security.PluginClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.applet.AppletClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.applet.AppletClassLoader.loadCode(Unknown Source)
    at sun.applet.AppletPanel.createApplet(Unknown Source)
    at sun.plugin.AppletViewer.createApplet(Unknown Source)
    at sun.applet.AppletPanel.runLoader(Unknown Source)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    where sample is the name of my war.
    thanks,
    Hatem

    hi,
    i'm trying to load an applet from a jsp file using the <jsp:plugin ....
    tag
    it works fine when i don't use codebase and the applet class is in the same
    directory as the jsp file.
    but when i put the applet class in WEB-INF/classes and use
    codebase="./classes" i get the following exception
    Opening http://localhost:7001/sample/classes/SampleApplet.class with cookie
    "JSESSIONID=OyTn8rKuaBWh27ZhpDL5mzxY8biDLgRAZDOA2Zg8w8kmo4196Pwy!47472665222
    44203586!168453146!7001!7002".
    java.lang.ClassFormatError: SampleApplet (Bad magic number)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at sun.applet.AppletClassLoader.findClass(Unknown Source)
    at sun.plugin.security.PluginClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.applet.AppletClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.applet.AppletClassLoader.loadCode(Unknown Source)
    at sun.applet.AppletPanel.createApplet(Unknown Source)
    at sun.plugin.AppletViewer.createApplet(Unknown Source)
    at sun.applet.AppletPanel.runLoader(Unknown Source)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    where sample is the name of my war.
    thanks,
    Hatem

  • How-to: APPLET-tag for applet in com.foo.bar?

    Hi,
    I have an applet in the package com.foo.bar and am struggling to get the applet-tag in my HTML right to get the applet loaded.
    Can anyone tell me how it should look like?
    Furthermore, I am planning to store the applet in a jar (say MyApplet.jar) How would the a HTML look like in that case.
    I can assure that the applet runs, because when I remove the package statement in the applet class it all works excellently.
    Thanks in advance,
    Iwan

    when you jar it. be in the directory that the com package folder exists in. then use "jar cvf MyApplet.jar com/foo/bar/*.class"
    This will tell the browser what jar file it needs so that it can get the classes.
    <param name="archive" value="MyApplet.jar">
    This will tell the browswer which class contains the init method in the jar.
    <param name="code" value="com.foo.bar.Class">
    Class being the name of the class with the init method in it.

  • Creating Plugin Modules for Use with Compiled Code

    Hi all,
    While programing a data analysis package in Labview, I've run into a problem that I don't really know how to answer.  It goes something like this: my program receives data from measurement devices in the form of ASCII or binary files, which I must then process and evaluate.  The problem is, the data files can have a variety of different formats.  Right now, I only know of 4 or 5, but more could literally be added at any time.
    My thought is this: I'd love to have some sort of modular plugins for reading the data files.  In other words, I could have a subfolder under my application's space in the "Program Files" directory.  The subfolder would contain any number of "ReadFileX.xxx" modules.  Upon initiation, my code would scan that folder, determine the possible formats (based on the *.xxx files therein), and be capable of reading any of the files.  Ideally, the user would select a file, I would note its format, and call the appropriate plugin module to handle reading the data into my code.
    What is the best approach for doing something like this?  I looked (briefly) into using DLL's, but (from what I can tell) I would need to explicitly define the function name and the inputs / outputs in the "Call Library Node" function.  This would appear the break the modularity feature, as I want to be able to load the software, and then develop new plugins down the road when the need arises.  I also found some information on source distributions (in an LLB).  This option would probably work, but my efforts at coding a basic test of VI-Server were met with errors.
    Does anyone have any experience performing a similar task?  If so, would you share your knowledge / secrets with me?  I would be extremely grateful for your feedback.
    Thanks!
    Mark

    Mark - there is a Coding Challenge currently going on, and I have submitted an entry that shows how to dynamically instantiate a class based on a class that resides on disk. Specifically, you're going to be interested in "Get LV Class Default Value.vi" under the "Cluster, Class, and Variant" palette that allows you to create an instance of an object based on the path of the .lvclass file. The class you load is going to be what's called a child class of a parent class (or base class), where the child class implementation overrides the function of the parent class. The "Get LV Class Default Value.vi" is very loosely analogous a Class Constructor.
    You can deploy your application having implemented all the base class functions, then subsequently develop and deploy new classes to reside in a "plugins" folder without needing to change the original app code.
    If you find that contest entry helpful, consider dropping a vote, huh? The LabVIEW Communities have had access errors sporadically the past few weeks, so if you get a "Server Error" you may need to try again later. There's also going to be Forums maintenance today and tomorrow.
    a.lia-user-name-link[href="/t5/user/viewprofilepage/user-id/88938"] {color: black;} a.lia-user-name-link[href="/t5/user/viewprofilepage/user-id/88938"]:after {content: '';} .jrd-sig {height: 80px; overflow: visible;} .jrd-sig-deploy {float:left; opacity:0.2;} .jrd-sig-img {float:right; opacity:0.2;} .jrd-sig-img:hover {opacity:0.8;} .jrd-sig-deploy:hover {opacity:0.8;}

  • Path Pronlem with jsp:plugin 's codebase

    I am unable to call my JApplet Class with <jsp:plugin> tag in my JSP Page. I have tried almost every combination for codebase (absolute and relative paths ) but still there is an Error ClassNotFound .
    Please tell me the right way to call the Applet in JSP.
    along with a small example ...
    Jsp and the Class File exists in Different directories in My Web Project.

    Well, then I would just put in the object/embed tags yourself. You can get whatever the plugin tag writes by just using the tag once with static values and view the source in the browser and copy it out, then replace whatever values with scriptlets (or other taglib tags) to fill in the correct values.

  • Can't get jsp:plugin to work with jb5

    I am trying to get a Swing applet compiled with JDK 1.3.1 to run on a jsp page using the <jsp:plugin> tag. At this stage it is a ridiculously simple applet (just some JLabels and JTextFields) but I can't get it to work. Here is the jsp code:
    <jsp:plugin type="applet" code="nz.astarte.ganttapplet.GanttApplet"
    codebase="./WEB-INF/classes" jreversion="1.3.1"
    width="400" height="175">
    <jsp:fallback>
    Plugin support could not be determined
    </jsp:fallback>
    </jsp:plugin>
    When I run it in the jb5 ide nothing shows up at all. OK, I figured the ide doesn't support the plugin, so leaving the ide running (which provides me with a web server) I go into IE (version 5) and enter the url to the page, which is http://localhost:8080/AppletCommunications/GanttApplet.jsp
    I get the page, and the gray box saying loading the applet but the plugin console tells me:
    load: class nz.astarte.ganttapplet.GanttApplet not found.
    java.lang.ClassNotFoundException: java.io.FileNotFoundException: http://localhost:8080/AppletCommunications/WEB-INF/classes/nz/astarte/ganttapplet/GanttApplet.class
    Why not? Under the directory where the jsp page is located is the directory structure WEB-INF/classes/nz/astarte/ganttapplet and in that directory is a GanttApplet.class file.
    I cannot understand why it isn't found. Do applets work with the jb5 ide? Is there something blindingly obvious that I've missed?
    Thanks, Andrew

    I appear to have solved it, but it is not clear to me why.
    I created a jar file of the required classes, and placed it in the same directory as the jsp file. My jsp code then looked like:
    <jsp:plugin type="applet" code="nz.astarte.ganttapplet.GanttApplet"
    codebase="."
    archive="GanttApplet.jar"
    jreversion="1.3.1"
    width="400" height="175">
    <jsp:fallback>
    Plugin support could not be determined
    </jsp:fallback>
    </jsp:plugin>
    This works fine. However I would expect to be able to move the jar file to some other directory, so that the jar file and jsp files are separated. I spent hours trying to work out why it wouldn't work when I had the jar
    file in WEB-INF/classes (under the jsp file directory) and had codebase="WEB-INF/classes/". In the end I put the jar file into a directory I defined separately called wotnot and defined codebase="wotnot/"
    Now it works. However I still think I should be able to have the jar file anywhere, including WEB-INF/classes and would love for someone to tell me why not!
    Thanks, Andrew

  • Help for jsp plugin

    The applet is not showing image on applet when running through following url. Remember It runs by simple applet tag in html but not through <jsp:plugin tag in jsp file.
    the following two links for same inker.jar file.
    not ok not running=====>"http://mycgiserver.com/~aftmycgijsp/jhan3.jsp"
    ok runing==============>"http://mycgiserver.com/~aftmycgijsp/jhan3.html"
    a) Tum.class in inker.jar with Image.jpg contain following code:
    image2 = getImage(getCodeBase(),"Image.jpg");
    g.drawImage(image2,0,0,this);
    b) I am using following tags in my jsp file,
    jhan3.jsp
    <html>
    <head>
    <jsp:plugin type="applet" code="Tum.class" codebase="http://www.mycgiserver.com/~aftmycgijsp/applets/jhan" jreversion="1.2" archive="inker.jar" width="171" height="185" >
    <jsp:fallback>
    Plugin tag OBJECT or EMBED not supported by browser.
    </jsp:fallback>
    </jsp:plugin>
    </body>
    </html>
    c) and the source file in my browser appears for above jsp is translated as to me as,
    <html>
    <head>
    <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" codebase="http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#Version=1,2,2,0" height="185" width="171">
    <param name="java_archive" value="inker.jar">
    <param name="java_codebase" value="http://www.mycgiserver.com/~aftmycgijsp/applets/jhan">
    <param name="java_code" value="Tum.class">
    <param name="type" value="application/x-java-applet;version=1.2">
    <comment><embed type="application/x-java-applet;version=1.2" codebase="http://java.sun.com/products/plugin/" height="185" width="171" java_archive="inker.jar" java_codebase="http://www.mycgiserver.com/~aftmycgijsp/applets/jhan" java_code="Tum.class">
    <noembed></comment>
    Plugin tag OBJECT or EMBED not supported by browser.
    </noembed></embed></object>
    </body>
    </html>
    please send any suggestions.

    This jsp:plugin tag should work. BUt the problem is that not showing image from jar file. but ok when used with html applet tag.

Maybe you are looking for

  • Send Vendor Balance confirmations report output (F.18) to External email ID

    Dear Friends. I have following requirement Our Client requirement is to send Vendor Balance confirmations report output (Tcode F.18) to external email ID of vendor. So please guide accordingly. I have done BASIS Settings for SMTP (Tcode SCOT, RZ10) a

  • Mailbox Behaviors will not save

    Got two outlook.com mail accounts running IMAP in Mavericks mail (with November patch). I Uncheck the two checkboxes in Mailbox Behaviors that save drafts and sent mails on the server. I move cursor to the other account, first account confirms I want

  • Question about same emails with others

    Good afternoon, the other day I walked into yahoo.com, because I wondered if I had done earlier account there. So, when I tried to log in, I chose that I can not remember my identity and asked me to write the security email I would have put in during

  • Classic and Hot Sync

    Having problem getting Classic to Hot Sync - any ideas? How do you locate IP address for the phone? Post relates to: Pre p100ueu (O2) This question was solved. View Solution.

  • Probelem When Deleting Files

    v 2.3; Windows XP I have been using LR since original beta and this is the first time this is occurring.  When I delete, the file deletes but still appears in LR with ? indicating lost file, but most disturbingly, LR stops responding.  I know how to