NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
praveen1174 Posted via mailing list.
|
Posted: Tue Feb 09, 2010 9:12 am Post subject: How to run an applet inside a portlet using NetBeans 6.5? |
|
|
Satya,
Thanks a ton.............................
your sujjestion really helped me a lot to resolve my issue.....
once again thank you very much....
jm alisoviejo wrote:
| Quote: |
Hi,
I am new on using NetBeans IDE.
I tried to run "HelloApplet" inside a portlet, I got
ClassNotFoundException as following:
load: class org.me.hello.MyApplet not found.
java.lang.ClassNotFoundException: org.me.hello.MyApplet
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed.
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
It worked fine if the applet was running from index.jsp file in the same
web project.
In HelloWorld_view.jsp file, I simply put a appet tag:
----------starting HelloWorld_view.jsp--------------------------
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%-- Uncomment below lines to add portlet taglibs to jsp
<%@ page import="javax.portlet.*"%>
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet"%>
<portlet:defineObjects />
<%PortletPreferences prefs = renderRequest.getPreferences();%>
--%>
HelloWorld Again - VIEW MODE
<applet code="org.me.hello.MyApplet" archive="HelloApplet.jar" width="200"
height="200"/>
-----------------end HelloWorld_view.jsp--------------------------------
----------------start
index.jsp----------------------------------------------
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<applet code="org.me.hello.MyApplet" archive="HelloApplet.jar"
width="200" height="200"/>
</body>
</html>
--------------------------end
index.jsp--------------------------------------
The HelloApplet.jar was correctly packed with the web war file.
Has anyone know why applet in portlet does not work?
Thanks
|
--
View this message in context: http://old.nabble.com/How-to-run-an-applet-inside-a-portlet-using-NetBeans-6.5--tp22382295p27510703.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|