Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Safari applet problem with object tag



On 23/01/2006, at 23:21, David Leader wrote:

I wonder if anyone on this list can identify the mistake I'm making with Safari and object markup. I posted to the mac webdev list a couple of weeks ago as I thought it more appropriate, but got no response:

I did a small test with the following code:

<OBJECT type="application/x-java-applet"
        classid="java:AppletTest"
        archive = "AppletTest.jar"
        width="150" height="150">
Java applet with a red background.
</OBJECT>

<APPLET
	code="AppletTest.class"
	archive = "AppletTest.jar"
	width="150"
	height="150">
Java applet with a red background.
</APPLET>

And both of them work.

Then, I added the "codebase" option (and moved the jar to the directory test), and only the <APPLET> version worked:

<OBJECT type="application/x-java-applet"
		codebase="test"
        classid="java:AppletTest"
        archive = "AppletTest.jar"
        width="150" height="150">
Java applet with a red background.
</OBJECT>

<APPLET
	code="AppletTest.class"
	codebase="test"
	archive = "AppletTest.jar"
	width="150"
	height="150">
Java applet with a red background.
</APPLET>


This seems to indicate that a possible workaround could be to keep the jar at the same directory level as the web page (at least as seen from the browser). I just checked the server logs, and this is indeed what happens: the browser sends a request for the jar at the page's directory level.


mod_rewrite may come in handy here: if Safari sends an HTTP request for /path/to/Archive.jar, and you keep it in /path/to/codebase/ Archive.jar, you can just rewrite the URL to the correct one.


Hope this helps,

Morten

PS. I'll file the bug.


-- Morten Norby Larsen Ludit s.r.l. Via Battaglia 8, I-20127 Milano, Italy Phone +39 02 26 11 70 89, Fax +39 02 28 46 037 email@hidden - http://www.ludit.it

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >Safari applet problem with object tag (From: David Leader <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.