portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leila Homaeian <le...@ece.ualberta.ca>
Subject Embed Applet in Portlet
Date Thu, 25 May 2006 18:34:21 GMT

I am using Jetspeed 2 and Apache Tomcat/5.5.12.
I have been trying to embed an applet to a portlet. I have tried many 
alternatives but no success. My portal is under demo/ directory. and the 
path to my applet is: 
(my portlet called HelloWorld is located in the same directory as the 
and the path to my .jsp file is:

I am using Maven 1.0.2 to build my .WAR file. 

I am not sure how to set the value of the codebase tag. I 
have tried the following settings in my .jsp file: (response and request 
refer to RenderResponse and RenderRequest from the doView method, 

<applet border="0" align="top" height="195" width="152" 
code="org.apache.jetspeed.portlet.helloworld.myapplet" codebase='<%= 
<param name="type" value="application/x-java-applet">

<applet border="0" align="top" height="195" width="152" 
code="org.apache.jetspeed.portlet.helloworld.myapplet" codebase='<%= 
response.encodeURL("/WEB-INF/classes")%>' >
<param name="type" value="application/x-java-applet">

When I run my portal (by viewing http://siffleur.cs.ualberta.ca:8891/jetspeed/portal),
it says it cannot find "org.apache.jetspeed.portlet.helloworld.myapplet"
class file. I even tried to jar my applet code, put it in Maven 
repository, and use it my .jsp file as follows:

<%@ page import="myapp.myapplet" %>
<applet border="0" align="top" height="295" width="252" 
archive="myapplet-1.jar" code="myapp.myapplet">
<param name="type" value="application/x-java-applet">

But it still says that the applet class file is not found.

This is my applet code, if it helps:
package org.apache.jetspeed.portlet.helloworld;
import java.applet.Applet;
import java.awt.Graphics;
public class myapplet extends Applet{
    public void init() {
        System.out.println("Applet initializing");
    public void paint(Graphics g) {
        g.drawString("Your applet is running", 5, 10);
I should say that I am not referring to the applet in my doView method at 
all. Do you have any idea what is wrong? I'd appreciate any help.


To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org

View raw message