Can't get applets to load form directorys other than current.

Can't get applets to load form directorys other than current.

Post by Skin » Fri, 23 Jun 2000 04:00:00



apache 1.3.9
debian linux 2.2 kernel
IE 4.0, IE 5.0, Netscape 4.0

Hello

I want to build webpages which display java applets in
a common subdirectory.  However, I can't get this
type of scheme to work using the CODEBASE parm to
the <OBJECT> tag.  The java applets appear
as broken "boxes".  I can not get the applets to load
in my browser unless I have my applet class files in the
current directory.  How do I get the CODEBASE parm to work?

Here is a snippet of my html:

<OBJECT
        CODETYPE="application/java"
        CLASSID="java:applet.class"
        CODEBASE="classes" >
</OBJECT>

If I put the applet.class in the current directory of
the html file, it will display in the browser.  However,
if I put the applet.class file in the classes directory it
will not display.

I've also tried a CODEBASE line like this:
        CODEBASE="classes/" >
and like this also:
        CODEBASE="/classes/" >
and none of them work.

What gives?

John

 
 
 

Can't get applets to load form directorys other than current.

Post by Paul R. Meske » Wed, 12 Jul 2000 04:00:00


Try ./classes



Quote:

> apache 1.3.9
> debian linux 2.2 kernel
> IE 4.0, IE 5.0, Netscape 4.0

> Hello

> I want to build webpages which display java applets in
> a common subdirectory.  However, I can't get this
> type of scheme to work using the CODEBASE parm to
> the <OBJECT> tag.  The java applets appear
> as broken "boxes".  I can not get the applets to load
> in my browser unless I have my applet class files in the
> current directory.  How do I get the CODEBASE parm to work?

> Here is a snippet of my html:

> <OBJECT
>    CODETYPE="application/java"
>    CLASSID="java:applet.class"
>    CODEBASE="classes" >
> </OBJECT>

> If I put the applet.class in the current directory of
> the html file, it will display in the browser.  However,
> if I put the applet.class file in the classes directory it
> will not display.

> I've also tried a CODEBASE line like this:
>    CODEBASE="classes/" >
> and like this also:
>    CODEBASE="/classes/" >
> and none of them work.

> What gives?

> John

--
Paul R. Mesker
Java/JavaScript Developer
eSPECTO Inc.
http://www.especto.com

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

1. Konqueror can't load applets from DIRECT'ed sites

I'm crossposting since this is a problem that touches on several
areas. Here's the thing:
I've got an applet I'm trying to load from an internal webserver,
let's call him webdev1. The hostname is mapped to an IP specified in
my /etc/hosts file since I need a hostname for the webserver to
resolve.

- If I load the page containing the applets w/o any proxy specified,
it loads fine
- If I load the page with a proxy specified and use the IP address
instead of the hostname (i.e. http://192.168.1.2), it works fine
- If I load the page with a proxy specified but use the hostname
instead (i.e. http://webdev1), I get loads of ClassNotFoundExceptions
and the applet can't load
- If I load a page with an applet somewhere on the Internet (i.e.
Sun's site), their applet works fine proxied.

Bear in mind that Konqueror is using an autoconfig script to determine
what to proxy and what to connect to directly. Here's the wpad.dat:
function FindProxyForURL(url, host) {
    if(isPlainHostName(host)) {
        return "DIRECT";
    } else {
        return "PROXY 192.168.1.1:3128; DIRECT";
    }

So the problem is that all sites that meet the DIRECT response fail
and are improperly loaded.

Konqueror is unique in this problem since it loads the actual JRE
externally instead of using a plugin. This means that Netscape, IE,
etc. do not exibit this problem - I'm guessing since they rely in
their own internal implementations for applet classloaders.

This would seem to indicate that either the JRE or Konqueror is
improperly trying to load Java classes from the wrong source (maybe
requesting it from the proxy, not realizing that the connection was
made DIRECT).

I've tried this with Blackdown 1.3.1, Blackdown 1.4.1 and Sun's
1.4.1_02 so it's not distro-specific.

Oh yeah - setting the autoconfig script in the ControlPanel app
doesn't help either.

2. How to know how much HD space left?

3. squid can't load the applet.

4. ??==X/ppp/chat puzzle

5. Getting CURRENT load average

6. Static binary gethostbyname() fails?

7. problem of getting form's x-window ID

8. Backing up Solaris 7 in multi-user mode

9. how to dynamically load any object file into current process's address space

10. It's not bad canned meat...

11. wu-ftpd question -> can't see the files in the ~/ftp/pub directorys

12. help: can't read remote directorys at FTP sites anymore