This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with applet and Jsdk  RSS feed

 
abhay rege
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • 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.
 
sanjeev sharma
Greenhorn
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
Greenhorn
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 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>");
}
}
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!