File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Applets and the fly likes applet in JSP using firefox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "applet in JSP using firefox" Watch "applet in JSP using firefox" New topic
Author

applet in JSP using firefox

Neeraj Macker
Ranch Hand

Joined: Nov 10, 2004
Posts: 77
<jsp :p lugin type="applet" code="xyz.class" width="1000" height="100" name="XYZ">
<jsp :p arams>
<jsp :p aram name="cookie" value="<%=cookie%>"/>
<jsp :p aram name="host" value="<%=hostName%>"/>
</jsp :p arams>
</jsp :p lugin>

this code works fine in IE. but in firefox it gives error that the applet has no parameters
[ February 07, 2006: Message edited by: Neeraj Macker ]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Neeraj,

There is a checkbox on the edit screen (bottom left) for turning off those stupid smiley faces.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12835
    
    5
If this was my problem, the first thing I would do is "view source" in Firefox to see what is actually being written by those tags.
Bill
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42931
    
  68
To diagnose this it would be useful to see the HTML which gets generated for IE and for Firefox.
Neeraj Macker
Ranch Hand

Joined: Nov 10, 2004
Posts: 77
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" name="Connection Check Applet" width="1000" height="100" codebase="http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#Version=1,2,2,0">
<PARAM name="java_code" value="connectionCheckApplet.class">
<PARAM name="type" value="application/x-java-applet;">
<PARAM name="host" value="lot420">
<COMMENT>
<EMBED type="application/x-java-applet;" name="Connection Check Applet" width="1000" height="100" pluginspage="http://java.sun.com/products/plugin/" java_code="connectionCheckApplet.class" host="lot420"/>
<NOEMBED>

Your browser can't display this applet. Sorry

</NOEMBED>
</COMMENT>
</OBJECT>

i have jdk 1.5 installed on my client, so i guess that shud not be the problem.

the error in the javascript console of firefox points to:

function isConnected()
{
var server="lot420";
var applet=document.applets["Connection Check Applet"];
this line-->var value=applet.isConnected();
if(value == -1)
{
var mess="Die Verbindung war unterbrochen.\nDas Start Fenster is nicht mehr aktiv.\nBitte schliessen Sie dieses Fenster.";
alert(mess);
}
}
[ February 07, 2006: Message edited by: Neeraj Macker ]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42931
    
  68
So it's the Java/JavaScript interaction that is the problem. Is the isConnected method actually called in Firefox? I suspect that you need to add mayscript and/or scriptable parameters. You can find the specifics on that in the Plugin Developers Guide.
[ February 07, 2006: Message edited by: Ulf Dittmer ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61766
    
  67

Moved to the Applets forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Neeraj Macker
Ranch Hand

Joined: Nov 10, 2004
Posts: 77
someone please help...
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42931
    
  68
Originally posted by Neeraj Macker:
someone please help...


I did, but you never answered my question. Did you try adding the scriptable/mayscript attributes like the Plugin Dev Guide explains?
Neeraj Macker
Ranch Hand

Joined: Nov 10, 2004
Posts: 77
mayscript attributes are added when the applet needs to interact with windows or javascript objects in the html page..i am not doing any such activity...

i have found out my problem. my firefox installation is unable to find a java plugin. inspite of there being all dlls in the firefox/plugins directory...can u help me sort this out...i am working on windows xp
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42931
    
  68
In the Java Plugin control panel, you may need to select the plugin/JVM Firefox should use. It's not uncommon to have several JVMs installed, and not all of them may be usable.
[ February 09, 2006: Message edited by: Ulf Dittmer ]
Neeraj Macker
Ranch Hand

Joined: Nov 10, 2004
Posts: 77
i have only one jvm on my system
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42931
    
  68
You can use the last resort Windows gives you: uninstall the JVM and Firefox, then re-install them.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: applet in JSP using firefox