• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem with applet and Jsdk

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
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.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 AppImg.java 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.io.*;
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
{
session=request.getSession(false);
System.out.println("CommonNodes object from session is "+session.getValue("CommonNodes"));
cNodes=(CommonNodes)session.getValue("CommonNodes");
this.IncludedCities = cNodes.getIncludedCities();
System.out.println("Included Cities length is "+IncludedCities.size());
PrintWriter out=response.getWriter();
out.println("<html>");
out.println("<applet code=\"AppImg.class\" name=\"LinkCity\" width=\"405\" height=\"410\" hspace=\"0\" vspace=\"0\" mayscript>");
out.println("</applet>");
out.println("</html>");
}
}
 
reply
    Bookmark Topic Watch Topic
  • New Topic