launch applet with APPLET or PLUGIN

Discussion in 'Java' started by cym tronik, Aug 13, 2005.

  1. cym tronik

    cym tronik Guest

    Hi,
    not sure this is the right place for my problem ...

    In a web page I use an applet. If I launch the applet in a
    HTML file, like this:

    <APPLET CODE="myapplet.class" ...>

    everything goes well. But if I launch it in a JSP file:

    <jsp:plugin type="applet"
    code="myapplet.class"
    ....>

    the Firefox (1.03 and 1.06) says it needs a plug-in. When promted to
    look for it, it says it cannot be found. The JSP generated by Tomcat
    5.5.9 from the instruction "jsp:plugin ..." mentions :

    <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    width="600" height="420"
    codebase="http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#Version=1,2,2,0">

    i.e. the latest Java plug-in.

    The EMBED part of the generated code for IE works fine, which drives
    me mad, I hate IE.

    Any idea of what's wrong ?

    cymtronik
    cym tronik, Aug 13, 2005
    #1
    1. Advertising

  2. On Sat, 13 Aug 2005 17:32:16 +0200, cym tronik wrote:

    > In a web page


    [1] URL?

    >..I use an applet. If I launch the applet in a
    > HTML file, .... everything goes well. But if
    > I launch it in a JSP file:
    >
    > <jsp:plugin type="applet"
    > code="myapplet.class"
    > ...>


    Just before I forget. Why the heck do you not simply
    use the applet element? Is there anything specific to
    the (invalid) nested OBJECT/EMBED element that you require,
    that cannot be specified by the applet element?

    > the Firefox (1.03 and 1.06) says it needs a plug-in. When promted to
    > look for it, it says it cannot be found. The JSP generated by Tomcat
    > 5.5.9 from the instruction "jsp:plugin ..." mentions :
    >
    > <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    > width="600" height="420"
    > codebase="http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#Version=1,2,2,0">
    >
    > i.e. the latest Java plug-in.


    Err... '1.2.2' I don't see it here..
    <http://java.sun.com/j2se/1.4.2/docs/guide/deployment/autodl/autodl-files.html>
    >
    > The EMBED part of the generated code for IE works fine, which drives
    > me mad, I hate IE.


    Ain't it irritating? When the (accursed) IE is the only
    one that gets it right.

    > Any idea of what's wrong ?


    Let me start with HTML (the inconsistencies between browser
    renderings) applets (generally) Sun's lax attitude to both
    HTML and (now) applets.. How much more do you want?

    ...Had you considered doing this as an application?

    --
    Andrew Thompson
    physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
    "Not a word, could I relate. The story was quite clear.."
    Led Zeppelin 'Kashmir'
    Andrew Thompson, Aug 19, 2005
    #2
    1. Advertising

  3. cym tronik

    cym tronik Guest

    On Fri, 19 Aug 2005 04:10:58 GMT, Andrew Thompson
    <> wrote:

    >......
    >Just before I forget. Why the heck do you not simply
    >use the applet element? Is there anything specific to
    >the (invalid) nested OBJECT/EMBED element that you require,
    >that cannot be specified by the applet element?


    I may be wrong, but I believe there is a difference between the APPLET
    tag and the jsp:plugin one. The former only makes the browser to load
    Java if the browser is not yet Java enabled. If the applet uses newer
    version of Java there may be problems. The jsp:plugin forces the
    browser update the Java if necessary.

    >> the Firefox (1.03 and 1.06) says it needs a plug-in. When promted to
    >> look for it, it says it cannot be found. The JSP generated by Tomcat
    >> 5.5.9 from the instruction "jsp:plugin ..." mentions :
    >>
    >> <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    >> width="600" height="420"
    >> codebase="http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#Version=1,2,2,0">
    >>
    >> i.e. the latest Java plug-in.

    >
    >Err... '1.2.2' I don't see it here..


    I have not pasted the whole Tomcat generated file. The codebase=... is
    part of the file.

    >.....
    >..Had you considered doing this as an application?


    It is an applet.
    cym tronik, Aug 19, 2005
    #3
  4. cym tronik wrote:
    > On Fri, 19 Aug 2005 04:10:58 GMT, Andrew Thompson
    > <> wrote:
    >
    >
    >>......
    >>Just before I forget. Why the heck do you not simply
    >>use the applet element? Is there anything specific to
    >>the (invalid) nested OBJECT/EMBED element that you require,
    >>that cannot be specified by the applet element?

    >
    >
    > I may be wrong, but I believe there is a difference between the APPLET
    > tag and the jsp:plugin one. The former only makes the browser to load
    > Java if the browser is not yet Java enabled. If the applet uses newer
    > version of Java there may be problems. The jsp:plugin forces the
    > browser update the Java if necessary.
    >
    >
    >>>the Firefox (1.03 and 1.06) says it needs a plug-in. When promted to
    >>>look for it, it says it cannot be found. The JSP generated by Tomcat
    >>>5.5.9 from the instruction "jsp:plugin ..." mentions :
    >>>
    >>><OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    >>>width="600" height="420"
    >>>codebase="http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#Version=1,2,2,0">
    >>>
    >>>i.e. the latest Java plug-in.

    >>
    >>Err... '1.2.2' I don't see it here..

    >
    >
    > I have not pasted the whole Tomcat generated file. The codebase=... is
    > part of the file.
    >
    >
    >>.....
    >>..Had you considered doing this as an application?

    >
    >
    > It is an applet.
    >


    I do not see the OP on my news server yet, so forgive me if this is off
    base. Are you specifying the JRE version you are targeting? Perhaps
    targeting a later version will help.

    HTH,
    Ray

    --
    XML is the programmer's duct tape.
    Raymond DeCampo, Aug 19, 2005
    #4
  5. On Fri, 19 Aug 2005 13:00:12 GMT, Raymond DeCampo wrote:
    > cym tronik wrote:
    >> On Fri, 19 Aug 2005 04:10:58 GMT, Andrew Thompson
    >> <> wrote:


    >>>><OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    >>>>width="600" height="420"
    >>>>codebase="http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#Version=1,2,2,0">


    > I do not see the OP on my news server yet,


    Oddly, the OP's posts are coming in dated the 14th,
    maybe that is screwing something up. (How long does
    your news server retain posts?)

    >..so forgive me if this is off
    > base. Are you specifying the JRE version you are targeting?


    The above codebase indicates 'Java 1.2.2', *but* the
    classid[1] indicates to me that it specifies 'latest
    java'. I find that element most confusing.

    [1]
    <http://java.sun.com/j2se/1.4.2/docs/guide/plugin/developer_guide/using_tags.html#note_3>

    Perhaps it would help to see the complete statement written
    in the original JSP that *generates* this HTML.

    Actually, it just occured to me the OP specifically said
    *Firefox*. Being a Mozilla based browser, it should completely
    ignore the <OBJECT> element and would instead need the (invalid)
    <EMBED> element.

    >..Perhaps targeting a later version will help.


    1.2.2 is not listed on the page with 'versions available',
    they start at 1.3, but the 1.2.2 cab file certainly exists.

    Viz.
    <http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab>

    To the OP.
    What is the URL of your JSP? This is too slow.

    --
    Andrew Thompson
    physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
    "Give me a ticket for an aeroplane, ain't got time to take a fast train.."
    The Box Tops 'The Letter'
    Andrew Thompson, Aug 19, 2005
    #5
  6. cym tronik

    Dag Sunde Guest

    "Andrew Thompson" <> wrote in message
    news:...
    > On Fri, 19 Aug 2005 13:00:12 GMT, Raymond DeCampo wrote:
    >> cym tronik wrote:
    >>> On Fri, 19 Aug 2005 04:10:58 GMT, Andrew Thompson
    >>> <> wrote:

    >
    >>>>><OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    >>>>>width="600" height="420"
    >>>>>codebase="http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#Version=1,2,2,0">

    >

    <snipped
    >>..so forgive me if this is off
    >> base. Are you specifying the JRE version you are targeting?

    >
    > The above codebase indicates 'Java 1.2.2', *but* the
    > classid[1] indicates to me that it specifies 'latest
    > java'. I find that element most confusing.
    >
    > [1]
    > <http://java.sun.com/j2se/1.4.2/docs/guide/plugin/developer_guide/using_tags.html#note_3>
    >


    The classid indicates what Sun call "Dynamic Versioning", and is used
    together
    with the codebase attibute.

    If Codebase is set to
    "...autodl/jinstall-1_4-windows-i586.cab#Version=1,4,0,0"
    the client will use any version later than or equal to 1.4.0 If this is not
    present,
    the latest release of the version indicated in the "Version=xxx" family will
    be downloded (ie. at present: 1.4.2_06).

    So where I think you misunderstood is that the classId given does *not*
    indicate
    the 'latest Java', but at least the version given in "Version=" in codebase.
    If not
    present, the latest version *of that family* (ie. the 1.4 family in my
    example).

    --
    Dag.
    Dag Sunde, Aug 19, 2005
    #6
  7. On Sat, 20 Aug 2005 00:51:16 +0200, cym tronik wrote:

    > On Fri, 19 Aug 2005 14:05:26 GMT, Andrew Thompson
    > <> wrote:

    ...
    >>Perhaps it would help to see the complete statement written
    >>in the original JSP that *generates* this HTML.

    >
    > ok, here it is. My jsp file:
    >
    > <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">


    You do not need a transitional doctype on this web page,
    and the leading '\"' is invalid for HTML. I suggest..

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">

    > <HTML><HEAD><TITLE>JApplet</TITLE></HEAD>
    > <BODY>


    <div>

    > <jsp:plugin type="applet"
    > code="ASV_applet.class"
    > codebase = "/ASV_site"
    > width="700" height="600">
    > </jsp:plugin>


    </div>

    > </BODY></HTML>


    Which leaves only 11 errors for the undefined
    <EMBED>/<NOEMBED>/<COMMENT> elements and the
    attributes associated with them.

    (This is an irritation for me, as I usually like to
    validate HTML before proceeding, but it is impossible
    when using the nested <OBJECT>/<EMBED> structure.)

    OK.. I've changed the parameters, so I'll trim the rest
    of your 'what Tomcat said'...

    The above .JSP produces (in my tomcat)..

    ***
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
    <HTML><HEAD><TITLE>JApplet</TITLE></HEAD>
    <BODY>
    <div>
    <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="700"
    height="600"
    codebase="http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#Version=1,2,2,0">
    <PARAM name="java_code" value="ASV_applet.class">
    <PARAM name="java_codebase" value="/ASV_site">
    <PARAM name="type" value="application/x-java-applet;">
    <COMMENT>
    <EMBED type="application/x-java-applet;" width="700" height="600"
    pluginspage="http://java.sun.com/products/plugin/"
    java_code="ASV_applet.class" java_codebase="/ASV_site"
    >

    <NOEMBED>
    </COMMENT>
    </NOEMBED></EMBED>
    </OBJECT>

    </div>
    </BODY></HTML>
    ***

    That HTML prompted me to install the plug-in, but I
    chose to ingore/cancel it, since I use 1.5 Java in Mozilla

    I assume that mimics the behaviour you are seeing in FireFox?

    ...I saw a suspicious character in that output and removed
    it, to produce this (note: *1* character different)..
    ***
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
    <HTML><HEAD><TITLE>JApplet</TITLE></HEAD>
    <BODY>
    <div>
    <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="700"
    height="600"
    codebase="http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#Version=1,2,2,0">
    <PARAM name="java_code" value="ASV_applet.class">
    <PARAM name="java_codebase" value="/ASV_site">
    <PARAM name="type" value="application/x-java-applet;">
    <COMMENT>
    <EMBED type="application/x-java-applet" width="700" height="600"
    pluginspage="http://java.sun.com/products/plugin/"
    java_code="ASV_applet.class" java_codebase="/ASV_site"
    >

    <NOEMBED>
    </COMMENT>
    </NOEMBED></EMBED>
    </OBJECT>

    </div>
    </BODY></HTML>
    ***

    Here, that second HTML produce an NPE when the browser
    could not find the class.

    Try it in your FireFox.

    Ray.. do you still wonder why I avoid using the 'easy'
    '<jsp:plugin' way of placing applets in pages?
    Sun seems to not have the first clue when it comes to
    ...about everything related to HTML and JavaScript, I
    would prefer to rely on the applet element.

    --
    Andrew Thompson
    physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
    "I have to turn my head, until my darkness goes"
    The Rolling Stones 'Paint It Black'
    Andrew Thompson, Aug 20, 2005
    #7
  8. cym tronik

    cym tronik Guest

    Thanks Andrew,
    you've put me on the track. Your version of Tomcat is different of
    mine, your _working_ file:

    ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
    ><HTML><HEAD><TITLE>JApplet</TITLE></HEAD>
    ><BODY>
    ><div>
    ><OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="700"
    >height="600"
    >codebase="http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#Version=1,2,2,0">
    ><PARAM name="java_code" value="ASV_applet.class">
    ><PARAM name="java_codebase" value="/ASV_site">
    ><PARAM name="type" value="application/x-java-applet;">
    ><COMMENT>
    ><EMBED type="application/x-java-applet;" width="700" height="600"
    >pluginspage="http://java.sun.com/products/plugin/"
    >java_code="ASV_applet.class" java_codebase="/ASV_site"
    >>

    ><NOEMBED>
    ></COMMENT>
    ></NOEMBED></EMBED>
    ></OBJECT>
    >
    ></div>
    ></BODY></HTML>


    fails in my Firefox, but the next one, with the suspicious semicolon
    in <EMBED removed:

    ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
    ><HTML><HEAD><TITLE>JApplet</TITLE></HEAD>
    ><BODY>
    ><div>
    ><OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="700"
    >height="600"
    >codebase="http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#Version=1,2,2,0">
    ><PARAM name="java_code" value="ASV_applet.class">
    ><PARAM name="java_codebase" value="/ASV_site">
    ><PARAM name="type" value="application/x-java-applet;">
    ><COMMENT>
    ><EMBED type="application/x-java-applet" width="700" height="600"
    >pluginspage="http://java.sun.com/products/plugin/"
    >java_code="ASV_applet.class" java_codebase="/ASV_site"
    >>

    ><NOEMBED>
    ></COMMENT>
    ></NOEMBED></EMBED>
    ></OBJECT>
    >
    ></div>
    ></BODY></HTML>


    works fine. Now I have something to report to the Tomcat people.

    Regards

    Cym
    cym tronik, Aug 20, 2005
    #8
  9. On Sat, 20 Aug 2005 12:15:18 +0200, cym tronik wrote:

    > Thanks Andrew,
    > you've put me on the track. Your version of Tomcat is different of
    > mine, your _working_ file:

    ....
    >><EMBED type="application/x-java-applet;" width="700" height="600"

    ....
    > fails in my Firefox, but the next one, with the suspicious semicolon
    > in <EMBED removed:

    ...
    >><EMBED type="application/x-java-applet" width="700" height="600"

    ...
    > works fine. Now I have something to report to the Tomcat people.


    I don't think it is quite that straightforward.
    This is the first time I have looked closely at the
    output of the <jsp:plugin statement, generally I use
    the <APPLET> element.

    After poking further into the jsp:plugin element at
    the bug database, I realised why the ';' is there
    (docs may also have indicated, but..) for a reason.
    Look at these bugs, and notice that after the semi-colon
    is a 'version=n.n.n'.

    <http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4823518>
    ...
    type="application/x-java-applet;version=1.4.1_01"

    <http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4870461>
    ...
    type="application/x-java-applet;version=1.3.1"

    Maybe Ray 'hit the nail on the head' for the solution..
    Specify a version later than 1.2.2 and the plugin element
    will most likely complete that attribute with a sensible value.

    OTOH, the absence of ..
    type="application/x-java-applet;version=1.2.2"
    ...does seem like a bug (to me).

    --
    Andrew Thompson
    physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
    "As it is I'm climbing up an endless wall. No time at all."
    The Police 'No Time This Time'
    Andrew Thompson, Aug 20, 2005
    #9
  10. cym tronik

    cym tronik Guest

    On Sat, 20 Aug 2005 12:06:14 GMT, Andrew Thompson
    <> wrote:

    >...
    >After poking further into the jsp:plugin element at
    >the bug database, I realised why the ';' is there
    >(docs may also have indicated, but..) for a reason.
    >Look at these bugs, and notice that after the semi-colon
    >is a 'version=n.n.n'.


    I've tried the version attribute, I've even pasted an example from
    Sun's tutorial page, and it does not work. I've tried space, slash,
    dollar instead of this semicolon, no better. I think it is a bug, yes.

    Cym
    cym tronik, Aug 20, 2005
    #10
  11. cym tronik

    cym tronik Guest

    cym tronik, Aug 20, 2005
    #11
  12. Andrew Thompson wrote:
    > On Sat, 20 Aug 2005 00:51:16 +0200, cym tronik wrote:
    >
    >
    >>On Fri, 19 Aug 2005 14:05:26 GMT, Andrew Thompson
    >><> wrote:

    >
    > ..
    >
    >>>Perhaps it would help to see the complete statement written
    >>>in the original JSP that *generates* this HTML.

    >>
    >>ok, here it is. My jsp file:
    >>
    >><!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">

    >
    >
    > You do not need a transitional doctype on this web page,
    > and the leading '\"' is invalid for HTML. I suggest..
    >
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
    >
    >><HTML><HEAD><TITLE>JApplet</TITLE></HEAD>
    >><BODY>

    >
    >
    > <div>
    >
    >><jsp:plugin type="applet"
    >> code="ASV_applet.class"
    >> codebase = "/ASV_site"
    >> width="700" height="600">
    >></jsp:plugin>

    >
    >
    > </div>
    >
    >></BODY></HTML>

    >
    >
    > Which leaves only 11 errors for the undefined
    > <EMBED>/<NOEMBED>/<COMMENT> elements and the
    > attributes associated with them.
    >
    > (This is an irritation for me, as I usually like to
    > validate HTML before proceeding, but it is impossible
    > when using the nested <OBJECT>/<EMBED> structure.)
    >
    > OK.. I've changed the parameters, so I'll trim the rest
    > of your 'what Tomcat said'...
    >
    > The above .JSP produces (in my tomcat)..
    >
    > ***
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
    > <HTML><HEAD><TITLE>JApplet</TITLE></HEAD>
    > <BODY>
    > <div>
    > <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="700"
    > height="600"
    > codebase="http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#Version=1,2,2,0">
    > <PARAM name="java_code" value="ASV_applet.class">
    > <PARAM name="java_codebase" value="/ASV_site">
    > <PARAM name="type" value="application/x-java-applet;">
    > <COMMENT>
    > <EMBED type="application/x-java-applet;" width="700" height="600"
    > pluginspage="http://java.sun.com/products/plugin/"
    > java_code="ASV_applet.class" java_codebase="/ASV_site"
    >
    > <NOEMBED>
    > </COMMENT>
    > </NOEMBED></EMBED>
    > </OBJECT>
    >
    > </div>
    > </BODY></HTML>
    > ***
    >
    > That HTML prompted me to install the plug-in, but I
    > chose to ingore/cancel it, since I use 1.5 Java in Mozilla
    >
    > I assume that mimics the behaviour you are seeing in FireFox?
    >
    > ..I saw a suspicious character in that output and removed
    > it, to produce this (note: *1* character different)..
    > ***
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
    > <HTML><HEAD><TITLE>JApplet</TITLE></HEAD>
    > <BODY>
    > <div>
    > <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="700"
    > height="600"
    > codebase="http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#Version=1,2,2,0">
    > <PARAM name="java_code" value="ASV_applet.class">
    > <PARAM name="java_codebase" value="/ASV_site">
    > <PARAM name="type" value="application/x-java-applet;">
    > <COMMENT>
    > <EMBED type="application/x-java-applet" width="700" height="600"
    > pluginspage="http://java.sun.com/products/plugin/"
    > java_code="ASV_applet.class" java_codebase="/ASV_site"
    >
    > <NOEMBED>
    > </COMMENT>
    > </NOEMBED></EMBED>
    > </OBJECT>
    >
    > </div>
    > </BODY></HTML>
    > ***
    >
    > Here, that second HTML produce an NPE when the browser
    > could not find the class.
    >
    > Try it in your FireFox.
    >
    > Ray.. do you still wonder why I avoid using the 'easy'
    > '<jsp:plugin' way of placing applets in pages?
    > Sun seems to not have the first clue when it comes to
    > ..about everything related to HTML and JavaScript, I
    > would prefer to rely on the applet element.
    >


    Yes, I do wonder. I have never had any issues with <jsp:plugin> myself.
    You didn't indicate which character you changed above so i couldn't be
    bothered to diff it myself.

    Using <jsp:plugin> is a double edged sword. First, the responsibility
    of getting it to work is not mine. So there is a group of people out
    there working on it without taking any effort from me. OTOH, if it is
    broken, I am at the mercy of others to get it fixed. So far, I haven't
    had a problem with it, as I said above. Also, it's not as if I deal
    with a billion applets; only two so far.

    FWIW, I think that <jsp:plugin> is actually implemented by the J2EE
    application server. (I could be wrong about this.)

    Ray

    --
    XML is the programmer's duct tape.
    Raymond DeCampo, Aug 20, 2005
    #12
  13. On Sat, 20 Aug 2005 12:49:19 GMT, Raymond DeCampo wrote:
    > Andrew Thompson wrote:


    >> Ray.. do you still wonder why I avoid using the 'easy'
    >> '<jsp:plugin' way of placing applets in pages?
    >> Sun seems to not have the first clue when it comes to
    >> ..about everything related to HTML and JavaScript, I
    >> would prefer to rely on the applet element.

    >
    > Yes, I do wonder. I have never had any issues with <jsp:plugin> myself.
    > You didn't indicate which character you changed above so i couldn't be
    > bothered to diff it myself.


    I removed the ';' from the embed 'type' attribute. You
    can probably see it more clearly here..
    <http://groups.google.com.au/group/comp.lang.java.programmer/msg/42e05d90de82a3fe>

    [ I also suspect these posts are getting through to you
    rather later to me. Do you see those posts at Google? ]

    > Using <jsp:plugin> is a double edged sword. First, the responsibility
    > of getting it to work is not mine. So there is a group of people out
    > there working on it without taking any effort from me. OTOH, if it is
    > broken, I am at the mercy of others to get it fixed. So far, I haven't
    > had a problem with it, as I said above. Also, it's not as if I deal
    > with a billion applets; only two so far.
    >
    > FWIW, I think that <jsp:plugin> is actually implemented by the J2EE
    > application server. (I could be wrong about this.)


    Do you usually specify the Java version?

    Do you know the pages to work in Mozilla browsers?
    Or (perhaps relevant), do Mozilla browsers ever access
    those two pages/applets you refer to?

    --
    Andrew Thompson
    physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
    "I know what I want but I just don't know ..how to go about gettin' it."
    Jimi Hendrix 'Manic Depression'
    Andrew Thompson, Aug 20, 2005
    #13
  14. Andrew Thompson wrote:
    > On Sat, 20 Aug 2005 12:49:19 GMT, Raymond DeCampo wrote:
    >
    >>Andrew Thompson wrote:

    >
    >
    >>>Ray.. do you still wonder why I avoid using the 'easy'
    >>>'<jsp:plugin' way of placing applets in pages?
    >>>Sun seems to not have the first clue when it comes to
    >>>..about everything related to HTML and JavaScript, I
    >>>would prefer to rely on the applet element.

    >>
    >>Yes, I do wonder. I have never had any issues with <jsp:plugin> myself.
    >> You didn't indicate which character you changed above so i couldn't be
    >>bothered to diff it myself.

    >
    >
    > I removed the ';' from the embed 'type' attribute. You
    > can probably see it more clearly here..
    > <http://groups.google.com.au/group/comp.lang.java.programmer/msg/42e05d90de82a3fe>
    >
    > [ I also suspect these posts are getting through to you
    > rather later to me. Do you see those posts at Google? ]


    No, I'm using my ISP's news server. Still haven't seen the OP. <shrug>

    >
    >
    >>Using <jsp:plugin> is a double edged sword. First, the responsibility
    >>of getting it to work is not mine. So there is a group of people out
    >>there working on it without taking any effort from me. OTOH, if it is
    >>broken, I am at the mercy of others to get it fixed. So far, I haven't
    >>had a problem with it, as I said above. Also, it's not as if I deal
    >>with a billion applets; only two so far.
    >>
    >>FWIW, I think that <jsp:plugin> is actually implemented by the J2EE
    >>application server. (I could be wrong about this.)

    >
    >
    > Do you usually specify the Java version?


    Yes; actually, s/usually/always

    >
    > Do you know the pages to work in Mozilla browsers?
    > Or (perhaps relevant), do Mozilla browsers ever access
    > those two pages/applets you refer to?
    >


    Yes, the applets work on Mozilla and Netscape. I think I have tested
    one of them on FireFox as well.

    Ray

    --
    XML is the programmer's duct tape.
    Raymond DeCampo, Aug 20, 2005
    #14
  15. cym tronik

    Roedy Green Guest

    On Sat, 20 Aug 2005 00:51:16 +0200, cym tronik <>
    wrote or quoted :

    ><jsp:plugin type="applet"
    > code="ASV_applet.class"
    > codebase = "/ASV_site"
    > width="700" height="600">


    I would want to see what the final page looks like, and check out
    various browsers to see what they think of it when fed to them from a
    local hard disk. Tweak the HTML till your browsers are happy, then
    tweak the JSP to match.

    I don't like the idea of Applets not contained in jars. They are ever
    so much more troublesome.
    Roedy Green, Aug 21, 2005
    #15
  16. cym tronik

    cym tronik Guest

    On Sun, 21 Aug 2005 07:30:27 GMT, Roedy Green
    <> wrote:

    >On Sat, 20 Aug 2005 00:51:16 +0200, cym tronik <>
    >wrote or quoted :
    >
    >><jsp:plugin type="applet"
    >> code="ASV_applet.class"
    >> codebase = "/ASV_site"
    >> width="700" height="600">

    >
    >I would want to see what the final page looks like, and check out
    >various browsers to see what they think of it when fed to them from a
    >local hard disk. Tweak the HTML till your browsers are happy, then
    >tweak the JSP to match.
    >
    >I don't like the idea of Applets not contained in jars. They are ever
    >so much more troublesome.


    here it is:

    <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">
    <HTML><HEAD><TITLE>JApplet</TITLE></HEAD>
    <BODY>
    <jsp:plugin type="applet"
    code="ASV_applet.class"
    codebase = "/ASV_site"
    width="700" height="600">
    </jsp:plugin>
    </BODY></HTML>


    which is translated by Tomcat 5.5.9 to:


    <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">
    <HTML><HEAD><TITLE>JApplet</TITLE></HEAD>
    <BODY>
    <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    width="700" height="600"
    codebase="http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#Version=1,2,2,0">
    <PARAM name="java_code" value="ASV_applet.class">
    <PARAM name="java_codebase" value="/ASV_site">
    <PARAM name="type" value="application/x-java-applet;">
    <COMMENT>
    <EMBED type="application/x-java-applet;" width="700" height="600"
    pluginspage="http://java.sun.com/products/plugin/"
    java_code="ASV_applet.class" java_codebase="/ASV_site"/>
    <NOEMBED>
    </NOEMBED>
    </COMMENT>
    </OBJECT>
    </BODY></HTML>

    The problems is the ";" in <EMBED type="application/x-java-applet;"

    It seems to be a Tomcat bug. The file works either without the ";" or
    with :

    <EMBED type="application/x-java-applet;version=1.5"

    but not with :

    <EMBED type="application/x-java-applet;version=1.5.o"

    as the Sun tutorial specifies. I'm new to this and rather disapointed
    by the JSP.

    Cym
    cym tronik, Aug 22, 2005
    #16
  17. cym tronik

    Roedy Green Guest

    On Mon, 22 Aug 2005 22:18:19 +0200, cym tronik <>
    wrote or quoted :

    ><OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    >width="700" height="600"
    >codebase="http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#Version=1,2,2,0">


    I think others have already tackled your problem. and found it was a
    bug in Firefox digesting the ; in this crap. I can't believe someone
    would willfully compose an interface this ugly, not even Microsoft.
    How did something so disgusting ever see the light of day?

    This clsid stuff is surely windows specific and the win.cab similarly.
    An interface to Java should be platform independent.

    I feel this sort of thing has to be boycotted on extreme aesthetic
    grounds. It is just too ugly to use.

    Look at the minute fraction of that crud having any information
    content in the SHannon sense. <applet was disgusting enough. This is
    preposterous.


    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com
    Roedy Green, Aug 23, 2005
    #17
  18. On Mon, 22 Aug 2005 22:18:19 +0200, cym tronik wrote:

    > The problems is the ";" in <EMBED type="application/x-java-applet;"
    >
    > It seems to be a Tomcat bug. The file works either without the ";" or
    > with :
    >
    > <EMBED type="application/x-java-applet;version=1.5"

    ...
    > ...I'm new to this and rather disapointed by the JSP.


    ?!? Applets are no easy matter to deploy.

    But I feel you have missed something important here..
    I will quote Raymond DeCampo from an earlier post
    to this thread.

    "..Are you specifying the JRE version you are targeting?
    Perhaps targeting a later version will help."

    You have found that exact advice fixes the problem, which
    leads me to.. why *aren't* you specifying a version?

    Very few Java developers would dare risk running Swing
    using Java 1.2*, but would probably specify 1.4 as the
    minimum Java required. * Though the Swing classes were
    incorporated in the 1.2 core classes, a lot of them had
    quirky bugs, as I understand.

    As an aside, I would be interested in seeing a link to
    any bug report you lodge. I would not be the slightest
    bit surprised if the 'closed - not a bug' explanation is
    'Developer should specify a version'.

    --
    Andrew Thompson
    physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
    "Seen you on Aldebaran, safe on the green desert sand"
    The Rolling Stones '2000 Light Years From Home'
    Andrew Thompson, Aug 23, 2005
    #18
  19. On Mon, 22 Aug 2005 22:18:19 +0200, cym tronik wrote:

    > <EMBED ...

    ....
    > ...I'm new to this and rather disapointed by the JSP.


    I have just identified another source of my irritation
    at that statement.

    If you want to 'blame' anybody for this mess, put the
    blame where it belongs, Mozilla. It is the Mozilla
    family of browsers that introduced the <EMBED> element.

    Despite the common acceptance of the <OBJECT> element
    (including by the W3C, the HTML recommendation group
    that decides what will, and will not, be considered
    valid HTML), Mozilla is still pushing this idiotic
    structure some.. 6, 7(?) years after it should have
    been considered a lost battle.

    The Mozilla family of browsers are generally good
    user agents, but that aspect of them, irk's me no end.

    --
    Andrew Thompson
    physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
    "You can blow out a candle, but you can't blow out a fire. Once the flame
    begin to catch, the wind will blow it higher."
    Peter Gabriel 'Biko'
    Andrew Thompson, Aug 23, 2005
    #19
  20. cym tronik

    Roedy Green Guest

    On Tue, 23 Aug 2005 06:19:40 GMT, Andrew Thompson
    <> wrote or quoted :

    >Very few Java developers would dare risk running Swing
    >using Java 1.2*, but would probably specify 1.4 as the
    >minimum Java required. * Though the Swing classes were
    >incorporated in the 1.2 core classes, a lot of them had
    >quirky bugs, as I understand.


    With 1.2 Swing was not part of the distribution, but you could add
    your own jar if you wanted to experiment.

    With 1.3 Swing was included as part of the distribution. I consider
    this the official advent of Swing.

    It would be interesting to do a frequency distribution of JREs out in
    the universe. I wonder if we often are going to tremendous work with
    backward compatibility for people who use nothing but email and porn
    viewing anyway.
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com
    Roedy Green, Aug 23, 2005
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page