aspose 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
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: 41830
    
  63
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 - my free Android networking tools app
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: 41830
    
  63
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