In doing some more tests it appears that the display problem is
related to declaring the applet width as 100% in conjunction with
nesting it in a table <td> tag.  If I declare the applet width as a
fixed number of pixels then the applet will display in a <td> tag. 
This is rather limiting.  When using applet width set to 100% it will
only display if it is not nested inside any <td> tags.

Gerry Reno

--- Gerry Reno <[EMAIL PROTECTED]> wrote:
>   I looking at the applet tag in the page source I can see that it is
> sitting in a <table> construction like so:
> <table ...>
>   <tr>
>     <td>
> <applet ...>
> </applet>
>     </td>
>   </tr>
> </table>
> 
>   So I did a little experimentation with applets and table tags and
> found that applets will not display in the above type of layout.  But
> they will display in a table if you just remove the enclosing <td>
> tag
> so it looks like this:
> <table ...>
>   <tr>
> <applet ...>
> </applet>
>   </tr>
> </table>
> 
>   Don't know why the <td> tag is a problem, but it is.  Anyone know
> how
> we can get Jetspeed to quit putting the <td> tag around the <applet>
> tag?
> 
> thx,
> Gerry Reno
> 
> 
> --- Gerry Reno <[EMAIL PROTECTED]> wrote:
> >   Ok, with a slight variance on the codebase ( just 'applets' ) the
> > applet is loading and starting.  However there is another problem -
> > the
> > applet does not display.  I can see in the Java Console that it is
> > running and doing all the things that it should be doing but no
> > display.  I've tried this under a couple different versions of
> Tomcat
> > and same thing on all of them.  I checked the page source and the
> > applet tag is there and all the parameters are right but I don't
> see
> > the applet.
> > 
> >   Any suggestions?
> > 
> > thx,
> > Gerry Reno
> > 
> > 
> > --- "Luta, Raphael  (VUN)" <[EMAIL PROTECTED]> wrote:
> > > 
> > > You cannot calculate the codebase relative to the Portlet JSP
> > > because this JSP is not accessed directly by the browser.
> > > 
> > > The codebase must be relative to the jetspeed servlet URI, which
> > > is /jetspeed/portal/ by default, thus your codebase should
> > > certainly be only "../applets", and this will work wherever your
> > > portlet JSPs are located :)
> > > 
> > > --
> > > Raphaël Luta - [EMAIL PROTECTED]
> > > Jakarta Jetspeed - Enterprise Portal in Java
> > > http://jakarta.apache.org/jetspeed/
> > > 
> > > 
> > > > -----Message d'origine-----
> > > > De : Gerry Reno [mailto:[EMAIL PROTECTED]
> > > > Envoyé : dimanche 3 août 2003 22:33
> > > > À : Jetspeed Users List
> > > > Objet : JSP Portlet with Applet
> > > >
> > > >
> > > > Env:
> > > > RH8.0
> > > > J2SE 1.4.2
> > > > Tomcat 4.1.24
> > > > Jetspeed 1.4b4
> > > >
> > > >   I am seeing strange behavior when trying to use an applet in
> a
> > > JSP
> > > > Portlet.  The entries in my jsp file within the applet tag are:
> > > >
> > > > <applet
> > > >       code="com.domain.applet.MyApplet.class"
> > > >   codebase="../../../../../applets"
> > > >    archive="domain-applets-myapplet.jar,
> > > >            ../lib/jjj.jar,
> > > >             "
> > > > ...
> > > > </applet>
> > > >
> > > >   The codebase is set this way due to the jsp file being in the
> > > > WEB-INF/templates/jsp/portlets/html/ directory.  The codebase
> for
> > > an
> > > > applet is calculated relative to the html/jsp file containing
> the
> > > > applet tag.
> > > >
> > > >
> > > >   Using Mozilla from Linux:
> > > >   The Java Console shows the following output:
> > > > Loading applet ...
> > > > Initializing applet ...
> > > > Starting applet ...
> > > > Connecting
> > > >
> > >
> >
> http://localhost:8080/../../../../applets/domain-applets-myapplet.jar
> > > > with no proxy
> > > > Connecting
> > > >
> > >
> >
> http://localhost:8080/../../../../applets/domain-applets-myapplet.jar
> > > > with cookie " "
> > > > Connecting
> > http://localhost:8080/../../../../applets/../lib/jjj.jar
> > > > with no proxy
> > > > Connecting
> > http://localhost:8080/../../../../applets/../lib/jjj.jar
> > > > with cookie " "
> > > > Connecting
> > > > http://localhost:8080/../../../../applets/com/domain/applet/My
> > > > Applet.class
> > > > with no proxy
> > > > Connecting
> > > > http://localhost:8080/../../../../applets/com/domain/applet/My
> > > > Applet.class
> > > > with cookie " "
> > > > Connecting
> > > > http://localhost:8080/../../../../applets/com/domain/applet/My
> > > > Applet/class.class
> > > > with no proxy
> > > > Connecting
> > > > http://localhost:8080/../../../../applets/com/domain/applet/My
> > > Applet/class.class
> > > with cookie " "
> > > load: class com.domain.applet.MyApplet.class not found.
> > > java.lang.ClassNotFoundException:
> com.domain.applet.MyApplet.class
> > >   at
> > >
> sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:154)
> > >   at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
> > >   at
> > >
> sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:115)
> > >   at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
> > >   at
> > sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:558)
> > >   at sun.applet.AppletPanel.createApplet(AppletPanel.java:617)
> > >   at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1848)
> > >   at sun.applet.AppletPanel.runLoader(AppletPanel.java:546)
> > >   at sun.applet.AppletPanel.run(AppletPanel.java:298)
> > >   at java.lang.Thread.run(Thread.java:534)
> > > Caused by: java.io.IOException: open HTTP connection failed.
> > >   at
> > sun.applet.AppletClassLoader.getBytes(AppletClassLoader.java:257)
> > >   at
> > >
> sun.applet.AppletClassLoader.access$100(AppletClassLoader.java:43)
> > >   at
> sun.applet.AppletClassLoader$1.run(AppletClassLoader.java:144)
> > >   at java.security.AccessController.doPrivileged(Native Method)
> > >   at
> > >
> sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:141)
> > >   ... 9 more
> > > Exception: java.lang.ClassNotFoundException:
> > > com.domain.applet.MyApplet.class
> > > 
> > > 
> > >   Using IE6 under Windows:
> > >   The Java Console shows the following output:
> > > java.io.FileNotFoundException:
> > > http://localhost:8080/applets/domain-applets-myapplet.jar
> > > 
> > > 
> > >   From the Java Console output it appears as though the portlet
> is
> > > running the jsp file from http://localhost:8080 for Mozilla (and
> is
> > > cutting off one of the "../" in the codebase) and from
> > > http://localhost:8080 for IE6 (and is ignoring the
> ../../../../../
> > > leading path altogether) rather than from the template directory
> > > where
> > > it is stored.  This is not good.  It means that for any applet we
> > > cannot calculate codebase paths relative to the jsp file which is
> > > what
> > > you are supposed to do when using an applet.
> > > 
> > >   BTW, my applet works correctly in an iframe portlet in both
> > > browsers.
> > > 
> > >   Has anyone had any success displaying an applet from a JSP
> 
=== message truncated ===


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to