Results 1 to 11 of 11

Thread: Java component not showing (can't find file)

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2000
    Location
    Québec, Canada
    Posts
    212

    Java component not showing (can't find file)

    Hi,

    I've got a problem with one of my sites,
    It uses a java component but since I've never used a JAVA applet before, I don't know lot about it. My problem is that the applet is working fine if the page is loaded directly in the webbrowser (adress typed or favortie) but it doesn't work if page is loaded from a 'href target'. Even odder, the site uses 3 frames (upper menu, left menu, content), if a page in 'content' uses an applet, it doesn't work in frames but ok if loaded directly in thge adress bar ?

    What's up with this ?
    Regards,

    El-Nino

  2. #2
    Hyperactive Member
    Join Date
    May 2000
    Posts
    367
    hmm sounds wierd. An applet has no knowledge of how it is loaded, and speaking programmatically they are all the same method, whether it be via an href or address bar, it is the same thing. An applet also doesn't know if the html page it resides in is part a frames page or not. So I tend to think the applet isn't the problem. Is this on a public site, if so I could take a look at it for you. Are you sure this an applet and not some javascript stuff with dhtml?

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Oct 2000
    Location
    Québec, Canada
    Posts
    212
    Sorry, it's an intranet site. And I'm 100% sure it is a java applet. It is uses for like text scrolling, etc.

    It sounds really weird to me too, but I've heard about something like codebase tag, don't know what it is...could this be a clue ?
    Regards,

    El-Nino

  4. #4
    Hyperactive Member
    Join Date
    May 2000
    Posts
    367
    I think this is the complete syntax for the applet tag

    Code:
        <APPLET
            CODEBASE = codebaseURL
            ARCHIVE = archiveList
            CODE = appletFile ...or...  OBJECT = serializedApplet
            ALT = alternateText
            NAME = appletInstanceName
            WIDTH = pixels  HEIGHT = pixels
            ALIGN = alignment
            VSPACE = pixels  HSPACE = pixels
        >
    required are code or object, width and height.

    Codebase is an OPTIONAL attribute specifies the base URL of the applet--the directory that contains the applet's code. If this attribute is not specified, then the document's URL is used.

    You might want to see where the java code resides and see if you need to set this.

  5. #5
    Hyperactive Member
    Join Date
    May 2000
    Posts
    367
    Here is a thought

    Is the index page, I.E. the one that sets up the frames in a different file path? I bet this your problem. And the page that holds the applet is in a different file path. I am not sure what path the applet would go to ( i.e. it may go to the root frame page path, or it may go the path of the page it is in, I will try to find out which), but in the meantime you might want to set the applet codebase tag to go the folder holding your class. It might be going to the root pages path and not finding it.

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Oct 2000
    Location
    Québec, Canada
    Posts
    212
    That the case; My 'content' frame does not necesseraly point to the same website as 'Left menu' and 'upper menu'. How can i solve this annoying problem?
    Regards,

    El-Nino

  7. #7
    Hyperactive Member
    Join Date
    May 2000
    Posts
    367
    If this is the case the fix is easy. What you need to do is find out the path for the applet class. And then put that in the codebase of the applet tag in the html containing your applet.

    For instance

    I have an html page in

    scores/score.html

    and the applet is in

    applets/scoreCompute.class

    so I set the codebase to the applets path.

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Oct 2000
    Location
    Québec, Canada
    Posts
    212
    mmm but what if the page are not on the same server ?
    http://firstsite.domain hosting
    http://secondsite.domain
    (intranet)

    It doesn't seem to work...
    =(
    Regards,

    El-Nino

  9. #9
    Hyperactive Member
    Join Date
    May 2000
    Posts
    367
    are they both web servers?

  10. #10
    Ya ya Baby!!!Me is Back
    Join Date
    Jul 2002
    Posts
    362
    Both page doesn't work

  11. #11

    Thread Starter
    Addicted Member
    Join Date
    Oct 2000
    Location
    Québec, Canada
    Posts
    212
    Ok found a temporary solution; i copied both .class to both servers and now it works. Seems odd though.

    Thanks for the input !
    Regards,

    El-Nino

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width