Forums Register Login

Applet as jsp plugin (Tomcat)

+Pie Number of slices to send: Send
Hey, I'm kinda new to applets and jsp. I want to make my applet run from Tomcat, as a plugin in a jsp page. My problem is, that when I want to load the page, the applet doesn't load. I get an error message, saying it can't find the .class file for the applet.
In Tomcat I put my prjocet folder into "webapps" folder.
In the project folder I have the .jsp file and a fodler named after the package of the applet, and it contains the appletName.class and appletName.java files.

Here is the jsp code: (jsp:plugin tag) type="applet" code="appletName.class" codebase="packageName" jreversion="1.7" width="455" height="605" (jsp:plugin tag)

The fodler system:
../webapps/projectname/packageName/appletname.class appletname.java
../webapps/projectname/app.jsp

I was trying to make this thing work all night and no I'm tired, so if I wasn't clear at some point I'll explain it again.
Thanks for any help in forwards!
1
+Pie Number of slices to send: Send
Remove the codebase attribute, and be sure to include the fully qualified class name (including the package name) in the code attribute.
+Pie Number of slices to send: Send
Thank you very much! This problem is solved, but I bumped into another. Now the app is running, but not fully working. Some of the buttons doesn't react and the some labels aren't shown. I tryed it, and if I run it in NetBeans it's fully working.
Thanks for the answers in forward!
1
+Pie Number of slices to send: Send
Are there any error messages in the Java Console?
+Pie Number of slices to send: Send
No. This applet is a classic Mastermind game. The user have to guess the 4 colours that the computer "hide". The first screen tell the rules, and by clicking the start button the game starts. The first problem is, that the rules sometimes show sometimes don't and seems to be for no reason. The start button works every time. After clicking the start button the game starts and the game screen appears. There are 5 buttons on the bottom of the screen. The first four buttons are to chose colour, the fifth is an okay button, to send the guessed colours. The colour chosing buttons work fine, but when I press the okay button, nothing happens.

I know it's a long monologue, but I hope it gives a clear picture of my problem.
+Pie Number of slices to send: Send
Now I did nothing, just refreshed the page (as I did several times before), and the applet runs perfectly now.
The problem is gone for now, even though I wouldn't call it a stable program.
Thank you for your time!
Good heavens! What have you done! Here, try to fix it with this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1703 times.
Similar Threads
Calling an applet in a JSP page
java.lang.ClassNotFoundException: When including Applet in JSP
applet not loading
Applet-Integration in a JSF/Facelets application
Tomcat, JSP and Applet
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 19:49:31.