• 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 ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Calling Applet in JSP

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not able to call a simple helloWorld applet from jsp page session.jsp.Browser shows error applet/nameof applet not inited.i tried using applet tag and jsp:plugin tag also but error i am getting is same.My applet is in another project GUIFormExamples in source file folder manoj its name is HelloWorld.I am calling it in project Firstpro in jsp page session.jsp.GUIFormExamples is java class file library type.Firstpro is web project.

session.jsp



HelloWorld.java
 
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in my opinion, the flaw may be in follwoing line,



please be sure that "="/GUIFormExamples1/src/manoj/HelloWorld.class" and "/GUIFormExamples1/src/manoj" paths are right.


Regards,
 
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"code" is a class name, not a file name, so it shouldn't contain any slashes - only package names and the class name, separated by dots, like you would use whenever a class name is used.

"codebase" should be left out if the hierarchy of class directories is in the the same directory as the HTML page.

This section of the Java Tutorial talks about the applet tag in detail.
 
supriya riya
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Still i am not getting applet in jsp.I would like to mention again that jsp is in one project it is web project and applet is in another project that is a Java Class Library project.Both are in same workspace.Is this anything to do with HelloWorld.class file's location?

i tried following



i have used "." package separator and directory path for where my applet is for codebase

 
permaculture is a more symbiotic relationship with nature so I can be even lazier. Read tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic