Leonard:
I think the pivotal thing is "WEB-INF", for security reason, anything under this
directory is NOT allowed download to Browser, just can run , like java Servlet, the
applet class file must download to browser to run it, so , it can not be found.
To resolv this probleam, you can put the class file outer "WEB-INF" directory and set
proper codebase properties.
Hope this Help
ZhaoBin
> --- Leonard Wolters <[EMAIL PROTECTED]> wrote:
> > Hi there,
> >
> > I still have problems with loading applets within
> > jsp pages.
> >
> > Consider the following scenario:
> > I have a WAR file which consists of several .jsp
> > files, a "WEB-INF"
> > directory which contains a "classes" and a "lib"
> > directory. In the classes
> > directory, another directory "foo" exists which
> > contains the "BarApplet.class" file.
> >
> > From one of the jsp files, i try to load the applet
> > using the following
> > code:
> >
> > <jsp:plugin
> > type="applet"
> > code="foo.BarApplet.class"
> > codebase="/"
> > jreversion="1.3"
> > align="center"
> > height="400"
> > width="400"
> >
> >
> nspluginurl="http://java.sun.com/products/plugin/1.3.0_01/plugin-install.html"
> >
> >
>
>iepluginurl="http://java.sun.com/products/plugin/1.3.0_01/jinstall-130_01-win32.cab#Version=1,3,0,1"
>
> > >
> >
> > <jsp:fallback>
> > <p>Unable to start plugin.</p>
> > </jsp:fallback>
> > </jsp:plugin>
> >
> >
> > Still, each time the java console tells me that the
> > file foo.BarApplet.class cannot be found. Even after
> > changing the codebase
> > from relative to full (i.e. http://) it still
> > doesn't work out.
> >
> > The only thing that works is to copy the
> > "web-inf\classes\foo" directory
> > to the 'root' of the WAR file i.e. the place where
> > all .jsp files are
> > located. Then, I finally see the applet showing
> > up...
> >
> >
> > The only thing that I can figure out is that the
> > "web-inf\classes" is
> > unaccessable from the web --> it is unvisible.
> >
> > Can someone please help me out by telling me how
> > they succeeded in
> > showing applets from jsp pages ? Do I need to
> > explicitly create a jar
> > file containing the applet ? Or can i use the
> > web-inf\classes directory ?
> > (preferable). Or do I just need to put the classes
> > in the 'root' directory ?
> >
> > Please help me out !
> >
> > (I know for sure that it should be possible to
> > access the applet from the
> > web-inf\classes directory from a jsp file)
> >
> >
> > Thanks
> >
> >
> ===========================================================================
N�����r��zf���%��lz��j���w(�����Ƞ���%#�51$Ţ�b��-�����b����ڽ�.��&�+an�r��IH�
LDDI0�D�J����^���,�rR?����^��������j�m�����ڲ�ܢo鮇nr�?��}���ia���
0z�^�������?㲟㲗ڪf�m����ົ��o�������������gjg�H�m����
#���r������ګ�ڪ��z;)���I���l