Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

applet question

Posted on 2006-05-02
5
Medium Priority
?
308 Views
Last Modified: 2010-04-01
I would like to load an applet from the jsp page.
I have me code like this.

I have my class file in the .jar folder
I have my applet code in the jsp page like this
<applet code="XXXX.class" width=300 height=250 archive=XXYY.jar>
....
....
<params>
....
....
</applet code>
=================
The .jar has the applet class. The page is loading fine...but not the applet. How to I load the applet in the page.

0
Comment
Question by:winsuncareer
  • 3
5 Comments
 
LVL 3

Accepted Solution

by:
arun_kuttz earned 2000 total points
ID: 16585157
is your jar placed in the <your-web-app>/WEB-INF/classes/ or <your-web-app>/WEB-INF/jar/dir ???
The browser will not be able to access the archive if its placed within the WEB-INF dir...

create a dir ->
<your-web-app>/applets

place XXYY.jar into the dir

now modify the code as follows :

<applet code="XXXX.class" width=300 height=250 archive="/applets/XXYY.jar">
....
....
<params>
....
....
</applet code>


let me kno if it works..

-KuTtZ
0
 
LVL 3

Expert Comment

by:arun_kuttz
ID: 16585183
or... u might try something like :

<applet code="XXXX.class" width=300 height=250 codebase="/applets" archive="XXYY.jar">

-KuTtZ
0
 

Author Comment

by:winsuncareer
ID: 16585347
I have the .jar in my build directory.
The path for applet class in the jar is ....
/com/dtc/actualfolder/src/applets/XXXX.class

================
How do I do this? comment from-KuTtZ
=======================
                               create a dir ->
                                     <your-web-app>/applets

                                place XXYY.jar into the dir
0
 
LVL 3

Expert Comment

by:arun_kuttz
ID: 16585420
what i meant was, the jar should NOT be inside the WEB-INF directory.
basically.. what u must do is create a directory in the SAME HIERARCHICAL level as the WEB-INF dir like so -->

 |---/WEB-INF
 |          |
 |          |--/classes
 |             ...........
 |---/applets       <--------- u create the directory here

and place the jar inside it...



-KuTtZ
0
 
LVL 23

Expert Comment

by:Siva Prasanna Kumar
ID: 16585675
http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=23&t=003923

http://www.htmlcodetutorial.com/applets/_APPLET_CODEBASE.html

check this out.

i think it must be

<applet code="XXXX.class" width=300 height=250 codebase="../applets" archive="XXYY.jar">

and make sure your class name is correct (i.e Upper case & lowercase stuff).
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will help to fix the below errors for MS Exchange Server 2016 I. Certificate error "name on the security certificate is invalid or does not match the name of the site" II. Out of Office not working III. Make Internal URLs and Externa…
Sometimes MS breaks things just for fun... In Access 2003, only the maximum allowable SQL string length could cause problems as you built a recordset. Now, when using string data in a WHERE clause, the 'identifier' maximum is 128 characters. So, …
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question