Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Run an Applet from Dynamic Web Project
Run an Applet from Dynamic Web Project [message #222597] Wed, 08 October 2008 04:01 Go to next message
Armali is currently offline ArmaliFriend
Messages: 2
Registered: July 2009
Junior Member
I have a problem with loading an applet within eclipse if it is in a
dynamic web project.

my applet class file is in a jar file which in turn is placed under
Webcontent. When I load the html file that has the call to the applet
within eclipse it loads but NO APPLET. When I do it from outside eclipse
it works fine.


Any ideas how to get this working from eclipse.


Regards
Armali
Re: Run an Applet from Dynamic Web Project [message #222609 is a reply to message #222597] Wed, 08 October 2008 20:34 Go to previous messageGo to next message
Angel Vera is currently offline Angel VeraFriend
Messages: 63
Registered: July 2009
Member

I am clear if your trying to load the applet when you are running your
application using a server or not. But I will asume this is not the case...

Are you using IE, to open the html file? It might be the case that the
internal browser doesn't support the applet tag, but I doubt it since it is
based in IE, if you are using Windows. If you are using Linux, it might be
a whole different thing all together. :)

armalean@yahoo.com (Armali ) wrote in news:c99d19921cf1290079b815a0dfd77853
$1@www.eclipse.org:

> I have a problem with loading an applet within eclipse if it is in a
> dynamic web project.
>
> my applet class file is in a jar file which in turn is placed under
> Webcontent. When I load the html file that has the call to the applet
> within eclipse it loads but NO APPLET. When I do it from outside eclipse
> it works fine.
>
>
> Any ideas how to get this working from eclipse.
>
>
> Regards
> Armali
>
>


Regards,
--
Angel Vera
WTP Server Tools Developer
Re: Run an Applet from Dynamic Web Project [message #222610 is a reply to message #222609] Wed, 08 October 2008 21:08 Go to previous messageGo to next message
Armali is currently offline ArmaliFriend
Messages: 2
Registered: July 2009
Junior Member
I'm using windows. When I run the html file that has the applet using (
Run on Server ) option (tomcat) it does not show the template.

It looks as it does not recognize that there is an applet taq. It gives no
error or something it just skips it.

While, the same code if placed under apache server Root folder it works
fine if opened by IE or firefox.
Re: Run an Applet from Dynamic Web Project [message #222611 is a reply to message #222610] Wed, 08 October 2008 21:56 Go to previous messageGo to next message
Angel Vera is currently offline Angel VeraFriend
Messages: 63
Registered: July 2009
Member

Your HTML when inside of your Dynamic WebProject, probably has the wrong
URL. It might be referencing to an absolute path or it is including folder
that do not exist when the project is deployed to the server.

I would export the Web project as WAR to understand how the project gets
packaged.


Regards,
--
Angel Vera
WTP Server Tools Developer
Re: Run an Applet from Dynamic Web Project [message #688439 is a reply to message #222597] Fri, 24 June 2011 17:36 Go to previous messageGo to next message
present87 is currently offline present87Friend
Messages: 2
Registered: June 2011
Junior Member
Hi,

This might seem like a very very naive question but I any help will be appreciated. I am fairly new at web development. I created a dynamic web project in eclipse which I am deploying as a WAR on the server. Now i need to add a small applet that can spawn a browser process to my project. I have the applet and it works fine when I run it from a standalone html page. But I can't seem to understand where to put the applet class file in my eclipse web project and also what html tags to use in my JSP. I tried a lot of permutation and combinations but I fail to understand how to specify the path of my applet class file in my JSP.

This is the error that I get:

load: class launchprocess.class not found.
java.lang.ClassNotFoundException: launchprocess.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)


Please help me.
Re: Run an Applet from Dynamic Web Project [message #688474 is a reply to message #222597] Fri, 24 June 2011 19:03 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 2337
Registered: July 2009
Senior Member
Where under WebContent?

---
Nitin Dahyabhai
Eclipse WTP, IBM
Re: Run an Applet from Dynamic Web Project [message #688494 is a reply to message #688474] Fri, 24 June 2011 19:48 Go to previous messageGo to next message
present87 is currently offline present87Friend
Messages: 2
Registered: June 2011
Junior Member
I put my jsp file in the web content folder of eclipse project. I tried putting the applet file in src folder as well as the same folder where the jsp files are but nothing seems to work.
Re: Run an Applet from Dynamic Web Project [message #688510 is a reply to message #688494] Fri, 24 June 2011 20:10 Go to previous message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1310
Registered: July 2009
Senior Member
On 6/24/2011 3:48 PM, forums-noreply@eclipse.org wrote:
> I put my jsp file in the web content folder of eclipse project. I tried
> putting the applet file in src folder as well as the same folder where
> the jsp files are but nothing seems to work.

To a webapp, an applet class is just content. The default behavior for
a dynamic web project is to assume all Java source are webapp classes
destined to go under the WEB-INF/classes folder, which won't work for
applet classes. This means you can't just put your applet source under
the typical "src" folder.

Instead create a second Java source folder. Then make sure it builds
into a separate output folder. Open the project's Properties dialog and
go to the Deployment Assembly page. Remove the mapping that maps your
applet source folder to "WEB-INF/classes". Then add a Folder mapping
that maps the output folder where the applet classes are being compiled
to a suitable folder in the webapp. This will put the applet classes
into the webapp as content where the classes can be referenced by the
browser.

Cheers,
Larry
Previous Topic:Alignment of component in web page editor
Next Topic:Deploying remote web resources
Goto Forum:
  


Current Time: Thu Nov 27 13:34:51 GMT 2014

Powered by FUDForum. Page generated in 0.03740 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software