Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Problem with applet and Jsdk

Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to display applet with an image on it with Jsdk2.1?I am getting error as applet "so and so" can not be instantiated in status bar of browser?
Can somebody help me?
Thank you.
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can u post a sample of the code?
I dont seem to have the problem u have mentioned.
abhay rege
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sanjeev,
This is the code of that servlet which I am calling in a browser with Jsdk 2.1.The applet calssfile is in the src folder if Jsdk.when called it shows gray area of size if applet size defined in file of applet class.It shows applet AppImg cannot be instantiated(when this servlet is caaled in IE5.)

Thank you in advance.
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
import java.text.*;
import java.util.*;
public class CallApplet extends HttpServlet
HttpSession session;
CommonNodes cNodes=null;
ArrayList IncludedCities=null;
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
System.out.println("CommonNodes object from session is "+session.getValue("CommonNodes"));
this.IncludedCities = cNodes.getIncludedCities();
System.out.println("Included Cities length is "+IncludedCities.size());
PrintWriter out=response.getWriter();
out.println("<applet code=\"AppImg.class\" name=\"LinkCity\" width=\"405\" height=\"410\" hspace=\"0\" vspace=\"0\" mayscript>");
    Bookmark Topic Watch Topic
  • New Topic