• 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
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

Applet not inited message in JSP... what may be the reason

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<jsp:plugin type="applet" code=".\toolbar.class" codebase="c:\Documents and Settings\home\myDocuments\.\NetBeansProjects\Project\build\web\WEB-INF\classes" jreversion="1.6.0_03" width="400" height="350">
<jsp:fallback>Some Error
</jsp:fallback>
</jsp:plugin>

<h2>Hello World!</h2>
</body>
</html>

This is the code that i've written for running the applet in this JSP page.
THe class file of the applet is present in the path as indicated in codebase attribute of the plugin tag.when i run this page.. i get Applet not inited on the status bar. what could be the problem?

Thank You
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Files under the WEB-INF directory are not accessible to the web.
Applets are client side Java and can only access classes that are made available to them by the webserver.

 
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Furthermore, the value of the codebase attribute should be relative to the HTML file that contains the applet, and not contain an absolute directory path.

Also, use code="toolbar" instead of code=".\toolbar.class".
 
Self destruct mode activated. Instructions for deactivation encoded in this tiny ad.
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic