Applet security restrictions and aliased domains

Discussion in 'Java' started by douggunnoe@gmail.com, Oct 11, 2007.

  1. Guest

    I recently changed web hosts. My former host did not have support for
    Java. As a work around, I created an applet that opened a connection
    to a cgi script. The script dynamically created an html file and
    returned the address of the file back to the applet, which opened the
    new file.

    When I moved everything over to the new host, I made sure that the
    paths and addresses referenced in the script and applet remained the
    same so that I would not have to change anything.

    However, I am getting an IO exception.

    My new hosting account is set up with one primary domain, and several
    aliased domains, such that the aliased domains are each folders under
    the primary domain account. When someone types in www.my_aliased_domain.com,
    I assume it is the A records or cname records or what have you that
    point to the subfolder primary_domain/my_aliased_domain.

    My questions are (assuming the file paths and addresses are all
    correct) :

    1.Since Java applets can only communicate with the host from whence
    they came, would these security restrictions block a connection to an
    aliased domain?

    2.And if so, should I get an IO exception or some other exception?

    3.Should I try instead to connect to www.primary_domain.com/aliased_domain_folder/somefile.cgi
    instead of www.aliased_domain .com/somefile.cgi?
     
    , Oct 11, 2007
    #1
    1. Advertising

  2. wrote:
    ..
    >...As a work around, I created an applet ..


    That often turns into 'more work'.

    >..that opened a connection
    >to a cgi script. The script dynamically created an html file and
    >returned the address of the file back to the applet,


    How? Was the paramater written into the HTML
    as an applet param? But..

    >..which opened the
    >new file.
    >
    >When I moved everything over to the new host, I made sure that the
    >paths and addresses referenced in the script and applet remained the
    >same so that I would not have to change anything.


    *

    >However, I am getting an IO exception.


    *

    >My new hosting account is set up with one primary domain, and several
    >aliased domains, such that the aliased domains are each folders under
    >the primary domain account. When someone types in www.my_aliased_domain.com,


    ..these things are very much easier to investigate when
    you can provide an actual URL of the actual applet
    (or a test case facsimile) failing right in *my* browser,
    then I would not have had to ask the questions above,
    nor the two I might have asked, denoted by '*' that I
    simply could not be bothered asking, nore any that
    cropped up from the latter part of your message
    (trimmed).

    So. Have you got an URL for us?

    --
    Andrew Thompson
    http://www.athompson.info/andrew/

    Message posted via http://www.javakb.com
     
    Andrew Thompson, Oct 11, 2007
    #2
    1. Advertising

  3. Guest

    On Oct 10, 9:11 pm, "" <>
    wrote:
    > I recently changed web hosts. My former host did not have support for
    > Java. As a work around, I created an applet that opened a connection
    > to a cgi script. The script dynamically created an html file and
    > returned the address of the file back to the applet, which opened the
    > new file.
    >
    > When I moved everything over to the new host, I made sure that the
    > paths and addresses referenced in the script and applet remained the
    > same so that I would not have to change anything.
    >
    > However, I am getting an IO exception.
    >
    > My new hosting account is set up with one primary domain, and several
    > aliased domains, such that the aliased domains are each folders under
    > the primary domain account. When someone types inwww.my_aliased_domain.com,
    > I assume it is the A records or cname records or what have you that
    > point to the subfolder primary_domain/my_aliased_domain.
    >
    > My questions are (assuming the file paths and addresses are all
    > correct) :
    >
    > 1.Since Java applets can only communicate with the host from whence
    > they came, would these security restrictions block a connection to an
    > aliased domain?
    >
    > 2.And if so, should I get an IO exception or some other exception?
    >
    > 3.Should I try instead to connect towww.primary_domain.com/aliased_domain_folder/somefile.cgi
    > instead ofwww.aliased_domain.com/somefile.cgi?



    The answer, I discovered, is that a domain alias is not a problem for
    the applet's security safeguards.

    I also discovered that when one changes hosts, one should not panic
    when something goes wrong and assume there is some exotic problem.

    The mundane is the most likely culprit. :|
     
    , Oct 11, 2007
    #3
  4. Guest

    On Oct 10, 11:02 pm, "Andrew Thompson" <u32984@uwe> wrote:
    > wrote:
    >
    > .
    >
    > >...As a work around, I created an applet ..

    >
    > That often turns into 'more work'.
    >
    > >..that opened a connection
    > >to a cgi script. The script dynamically created an html file and
    > >returned the address of the file back to the applet,

    >
    > How? Was the paramater written into the HTML
    > as an applet param? But..
    >
    > >..which opened the
    > >new file.

    >
    > >When I moved everything over to the new host, I made sure that the
    > >paths and addresses referenced in the script and applet remained the
    > >same so that I would not have to change anything.

    >
    > *
    >
    > >However, I am getting an IO exception.

    >
    > *
    >
    > >My new hosting account is set up with one primary domain, and several
    > >aliased domains, such that the aliased domains are each folders under
    > >the primary domain account. When someone types inwww.my_aliased_domain.com,

    >
    > .these things are very much easier to investigate when
    > you can provide an actual URL of the actual applet
    > (or a test case facsimile) failing right in *my* browser,
    > then I would not have had to ask the questions above,
    > nor the two I might have asked, denoted by '*' that I
    > simply could not be bothered asking, nore any that
    > cropped up from the latter part of your message
    > (trimmed).
    >
    > So. Have you got an URL for us?
    >
    > --
    > Andrew Thompsonhttp://www.athompson.info/andrew/
    >
    > Message posted viahttp://www.javakb.com


    "That often turns into 'more work'."

    Tis true Andrew.

    The applet is at

    http://www.knowcasinos.com/sims/bjcalc/bja.html

    But it works now, so...

    In my OP I said "assuming the file paths and addresses are all
    correct". Assuming is bad.
     
    , Oct 11, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. .Net Sports
    Replies:
    1
    Views:
    390
    Verde
    Sep 17, 2005
  2. Leonard Slatkin
    Replies:
    0
    Views:
    457
    Leonard Slatkin
    Nov 1, 2003
  3. Gerrit Hulleman

    Restrictions on a Signed applet

    Gerrit Hulleman, Jul 2, 2004, in forum: Java
    Replies:
    1
    Views:
    634
  4. Andy C

    anti-aliased 2D vector graphics

    Andy C, Aug 1, 2003, in forum: Python
    Replies:
    10
    Views:
    640
    Borcis
    Aug 4, 2003
  5. Jim Cain
    Replies:
    7
    Views:
    153
    Brian Candler
    Jul 18, 2003
Loading...

Share This Page