File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Calling an applet in a JSP page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Calling an applet in a JSP page" Watch "Calling an applet in a JSP page" New topic
Author

Calling an applet in a JSP page

udaykumar maddigatla
Ranch Hand

Joined: Feb 03, 2009
Posts: 69
Hi,

I'm trying to embed an applet in a JSP page. I written like this.



My applet is in the package called 'Applets'. my jsp page and java classes are build in a way of normal webapplication structure.

When i try to execute the jsp page, it is giving error like below..



From the above error, my application path is http://localhost:9090/TranslationTool/

I also tried to add codebase='.'. But no use.

Please help me in this.

SCJP 5.0(84%), SCWCD 5.0(97%), SCDJWS 5.0(98%)
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39530
    
  27
Is "http://localhost:9090/TranslationTool/Applets/FileApplet.class " the correct path? In other words, can you download the class file if you paste that URL into the browser?

My applet is in the package called 'Applets'.

The "code" attribute must contain the fully-qualified class name, including the package. Remove the "codebase" attribute.


Ping & DNS - updated with new look and Ping home screen widget
udaykumar maddigatla
Ranch Hand

Joined: Feb 03, 2009
Posts: 69
HI

I removed codebase attribute and added fully Qualified class name in the code attribute. But problem remains the same.

My Class file is in this location 'TranslationTool/WEB-INF/classes/Applets/FileApplet.class'

Help me in this.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39530
    
  27
My Class file is in this location 'TranslationTool/WEB-INF/classes/Applets/FileApplet.class'

Nothing that's inside of WEB-INF can be served to the public. The class needs to be where the error message says it's looking for it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Calling an applet in a JSP page
 
Similar Threads
Cannot load applet
Unable to view Applet in client machine.
a simple examples cannot work.
playing audio in an applet and embedding that applet into a jsp or Html file
Applet in JSP