NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

How to run an applet inside a portlet using NetBeans 6.5?

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
praveen1174
Posted via mailing list.





PostPosted: Tue Feb 09, 2010 9:12 am    Post subject: How to run an applet inside a portlet using NetBeans 6.5? Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo