User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Java section within the Software Development category of DaniWeb, a massive community of 423,504 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,664 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Java advertiser: Lunarpages Java Web Hosting
Views: 652 | Replies: 6
Reply
Join Date: Jul 2006
Posts: 66
Reputation: himanjim is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 1
himanjim himanjim is offline Offline
Junior Poster in Training

Question APPLETS and server

  #1  
Oct 11th, 2007
I've designed a simple applet that works fine on My Windows Xp but when I upload it on my webhost server or run it through any server for e.g. Tomcat It shows the following error in Java Console but no error without server


Java Plug-in 1.6.0_02
Using JRE version 1.6.0_02 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\Administrator



----------------------------------------------------
----------------------------------------------------

APPLET tag missing CODE parameter.
java.lang.NullPointerException: name
at sun.applet.AppletClassLoader.getResourceAsStream(Unknown Source)
at sun.applet.AppletPanel$7.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
APPLET tag missing CODE parameter.
java.lang.NullPointerException: name
at sun.applet.AppletClassLoader.getResourceAsStream(Unknown Source)
at sun.applet.AppletPanel$7.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

I don't understand what code parameter is missing

My html code for it is
<APPLET> code="chat.class" width=650
height=600></APPLET>



AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2007
Location: USA
Posts: 2,825
Reputation: Ezzaral is a name known to all Ezzaral is a name known to all Ezzaral is a name known to all Ezzaral is a name known to all Ezzaral is a name known to all Ezzaral is a name known to all 
Rep Power: 12
Solved Threads: 282
Featured Poster
Ezzaral's Avatar
Ezzaral Ezzaral is offline Offline
Posting Maven

Re: APPLETS and server

  #2  
Oct 11th, 2007
You closed your applet tag before your parameters. Basically it's malformed HTML that is causing your problem.
<APPLET>  code="chat.class" width=650 
height=600></APPLET>

Side note: don't bold your entire message for no reason.
Reply With Quote  
Join Date: Jul 2006
Posts: 66
Reputation: himanjim is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 1
himanjim himanjim is offline Offline
Junior Poster in Training

Re: APPLETS and server

  #3  
Oct 12th, 2007
Thnx for ur reply but I didn't get you I don't have any params in my applets
Reply With Quote  
Join Date: May 2007
Location: USA
Posts: 2,825
Reputation: Ezzaral is a name known to all Ezzaral is a name known to all Ezzaral is a name known to all Ezzaral is a name known to all Ezzaral is a name known to all Ezzaral is a name known to all 
Rep Power: 12
Solved Threads: 282
Featured Poster
Ezzaral's Avatar
Ezzaral Ezzaral is offline Offline
Posting Maven

Re: APPLETS and server

  #4  
Oct 12th, 2007
Originally Posted by himanjim View Post
Thnx for ur reply but I didn't get you I don't have any params in my applets
Yes, applets have parameters, like "code". Your tag is not written correctly and I showed you exactly where it was broken.
Using the applet Tag
Reply With Quote  
Join Date: Jul 2006
Posts: 66
Reputation: himanjim is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 1
himanjim himanjim is offline Offline
Junior Poster in Training

Re: APPLETS and server

  #5  
Oct 12th, 2007
I tried that The same error persists in magnified form ...Actually I'm embedding the applet in the servlet.....I better try with embed and object tags
Reply With Quote  
Join Date: May 2008
Posts: 1
Reputation: pavandsr is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
pavandsr pavandsr is offline Offline
Newbie Poster

Re: APPLETS and server

  #6  
May 14th, 2008
The correct applet html code is

<applet code="yourclass.class" height=500 width=500></applet>

Hope it works fine.
Reply With Quote  
Join Date: Aug 2007
Location: New Hampshire
Posts: 3,366
Reputation: jasimp is on a distinguished road 
Rep Power: 8
Solved Threads: 18
jasimp's Avatar
jasimp jasimp is offline Offline
Nearly a Senior Poster

Re: APPLETS and server

  #7  
May 14th, 2008
Thread is a little old. I doubt they still need help.
A room without books is like a body without a soul.
Facts are meaningless. They can be used to prove anything that is even remotely true.
Go then, there are other worlds than these.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Java Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Java Forum

All times are GMT -4. The time now is 4:22 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC