Calling a applet in JSF page

Hello Folks

I am having problem accesing the applet from the web application my applet runs fine if i run it in the IDE.

These are my methods in the bean

public String getApplet() {

applet = "<applet code=\"applet.PrinterApplet.class\"codebase=\".\" archive=\"SSignedPrinterApplet.jar\" width=\"400\" height=\"400\">"+

"<PARAM NAME=\"fileName\" VALUE=\"TITLE_12732.pdf\">"+

"<PARAM NAME=\"basePath\" VALUE=\"<%=basePath%>\">"+

"</applet>";

return applet;

//"<applet code=\"PrinterApplet.class\" width=\"300\" height=\"300\"/>";

}

public void setApplet(String applet) {

this.applet = applet;

}

here is my jsf call

<h:outputText value="#{activitySummaryBean.applet}" styleClass="labelTextBlack"></h:outputText>

it does not invoke the applet it just displays the text.

<applet code="applet.PrinterApplet.class" codebase="." archive="SSignedPrinterApplet.jar" width="400" height="400"><PARAM NAME="fileName" VALUE="TITLE_12732.pdf"><PARAM NAME="basePath" VALUE="<%=basePath%>"></applet>

I was refering to the link below

http://developers.sun.com/prodtech/javatools/jscreator/reference/techart/2/applet.html?feed=DSC

please let me know your thoughts

Thanks,

Surendra

[1384 byte] By [Surendra_Varmaa] at [2007-11-26 15:59:51]
# 1

Hi Surendra,

I had same problem today. After a while i've found the solution:

You have to set the escape attribute of your <h:outputText /> tag to false. Because as default it's set to true and the HTML related character are escaped...

Result will be like this:

<h:outputText value="#{SessionBean.appletHTML}" escape="false" />

Good luck,

Vaclav

adnewa at 2007-7-8 22:21:07 > top of Java-index,Desktop,Core GUI APIs...