Board index » jbuilder » help with running an applet with JBX Ent

help with running an applet with JBX Ent


2004-09-03 01:44:36 AM
jbuilder17
Hello, I'm trying to run an simple applet via a webapp under wls and have
tried everything but I keep getting the class not found exception. :<
I have tried all kinds of options for the code and codebase properties in
the applet tag, but nothing is working. My setup has my domain in a
separate directory than BEA, and JBX is setup to run the project from it's
source (no files in the domain's applications directory). Instead of going
through the times I've tried (I can enumerate them later, but there are
quite a few things I've tried that haven't worked :<), can someone let me
know, point me in the direction of where things should go?
I've tried running the .class file (like I said the applet is simplistic an
self contained), I've tried jarring it up, putting it in an applet directory
under the web app dir. I've tried googling how to do it, but I haven't
found anything specific to the JB environment. Any ideas would be
appreciated. Thanks.
 
 

Re:help with running an applet with JBX Ent

To help matters, here's the applet tag in the jsp I'm using to call the
applet.
< applet
codebase = "./applet"
code = "ScrollingMessage.jar"
name = "ScrollingMessage"
width = "400"
height = "300"
hspace = "0"
vspace = "0"
align = "middle"
Quote

I've tried everything I can think of in the codebase and code attributes.
The jar file there has a manifest in it.
 

Re:help with running an applet with JBX Ent

I was able to get this ultra simplistic example to work.
< applet
codebase = "."
code = "test2.class"
name = "TestApplet2"
width = "400"
height = "300"
hspace = "0"
vspace = "0"
align = "middle"
Quote

But I want to put the codebase to something else other than "." I've tried
puting the files in an /applet directory, I've tried /WEB-INF/classes, I've
tried /classes, /WEB-INF/, I've even tried "bea_wls_internal/classes/" and
just /bea_wls_internal/ as per
e-docs.bea.com/wls/docs81/applets/usingapplets.html. But nothing is
useful is working. What am I doing wrong?
Signed,
Following the docs but they aren't helping me, stressed, confused, and ready
to try C#! :<
 

{smallsort}

Re:help with running an applet with JBX Ent

AHHA! I think I got something. I thought this was one of the things I
tried before though. :<
Here is the applet tag.
< applet
codebase = "<%=request.getContextPath()%>\applets"
code = "com.pch.webapp.ScrollingMessage"
name = "ScrollingMessage"
width = "400"
height = "300"
hspace = "0"
vspace = "0"
align = "middle"
Quote

And under the root of the webapp, I have an applet directory, and in there,
I copied the .class files. No jars at this point, just the class files and
all is good so far.
Thanks.
 

Re:help with running an applet with JBX Ent

Flip wrote:
Quote
AHHA! I think I got something. I thought this was one of the things I
tried before though. :<

Here is the applet tag.

< applet
codebase = "<%=request.getContextPath()%>\applets"
code = "com.pch.webapp.ScrollingMessage"
name = "ScrollingMessage"
width = "400"
height = "300"
hspace = "0"
vspace = "0"
align = "middle"
Or, how about the following?
<jsp:plugin type="applet"
code="com.pch.webapp.ScrollingMessage"
codebase="applet"
width ...
/>
(Since I haven't used an applet in a JSP, I
had to look this up ... I did so in Bergsten's
JSP [O'Reilly] book.)
Quote
And under the root of the webapp, I have an applet directory, and in there,
I copied the .class files. No jars at this point, just the class files and
all is good so far.
To quote Bergsten: "Note that the applet class must
be stored in a directory that can be accessed by the
Web browser; that is, it must be a part of the public
Web page structure...." Thus, if you JAR up your applet
classes, the JAR goes in the context root directory.
WEB-INF isn't accessible by the browser, so you
can't put the classes or JAR in either the classes
or lib dirs, respectively.
--
Paul Furbacher (TeamB)
Save time, search the archives:
www.borland.com/newsgroups/ngsearch.html
Is it in Joi Ellis's Faq-O-Matic?
www.visi.com/~gyles19/fom-serve/cache/1.html
Finally, please send responses to the newsgroup only.
That means, do not send email directly to me.
Thank you.
 

Re:help with running an applet with JBX Ent

"Flip" <[remove] XXXX@XXXXX.COM >writes:
Quote
codebase = "<%=request.getContextPath()%>\applets"
You are sure that works? URLs use forward slashes, even if the
filesystem uses backward ones.
Quote
And under the root of the webapp, I have an applet directory, and in
there, I copied the .class files. No jars at this point, just the
class files and all is good so far.
Jars should be in an archive attribute, e.g.
<applet code="some.Applet" archive="the.jar" ...>