The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
April 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

showDocument failing in Netscape 4.7 on Macintosh

Posted by Steve Williams on June 19, 2001 at 12:49 AM

Hi anyobody!

I have found a problem with the showDocument(url, frame) method, the problem is
that it fails to execute for a specific (long) URL:

http://10.34.1.10:8046/dbs/decrypt.jsp?ENCRYPTED_DATA=MDEyOABU86g^1CJhvt7ozi33t7
mgqXE5E8NROnLASe2e6X2bx1UreeTFin0t8r9zIlvBM3P^bcKq16TuoHi9rmHyJOh5CHFehVGniLUabZ
bODQZ3DW0O7pyrK-1Ion^6LSIwQRPQQge1VZvY117IBi2EMqkrRCs1smN2WFbFFRWG9cy-zKELu91l6S
aFimpQMVl^cG4YeajLOQh^j0qNtp6g^-rlatajvxgNzhYywX8gnHvkidJIOXwSZpNvrHfP^XAsM2Acsa
J0hFocjSZpHtv3fFaM2qpo3ef5s9sZVFyHfX8I0sBtoz7VBQ^Zh5bQcaVm87TBXs3wnn0HrtfudpSyGH
0JFFpoFZwjVggEu2-jnFtu07vAaEq83UOynrIxNqUDoOsGIZjYv^8h7FFROX4ZE61W3YkccK^d0aA7De
uFhIrpOvi0O4dIKEpaAw8pOC5spKgoaVndFI7ICoWDMhj009MwtN9s0sUd1u8~

Since showDocument does not throw any exceptions when it fails, I have no idea
why this URL does not get submitted.

Another unusual thing is that it works fine for other similar URLs, for example:

http://10.34.1.10:8046/dbs/decrypt.jsp?ENCRYPTED_DATA=MDEyOABl9I4FEyJUjIb3T8YmpY
RoIoVBMv4moDKfZvr2i3S9VZESYt8pPqtFI780-bhDjXV4Jd5EM-KLP00KS73elRuKVo^pHD0wcHi3HE
ntXjV43dI7tF9YqaGwDnkMYTMcXF18MAS2Z3uZYD9vHYL7PxCgJs9zRENNuSN6BSihY3XwbNUmCGfALL
^5BZWxTU2MeryYW6LUPO9o2IKJV3dAzldQwNH8T5Iu4HV4pMTFs1dKb9u14LIVdBd^EaT3eETIWoMTsM
sSXdlLmpvRJMU6qmXNkqRF7NOSwOkXyUxjAsZqP6GXvegC4vhpYCymOjuZt-eJMYtKuqFgzEQcWTSfg9
oMIKzt3bkaLt8-l-gcf2hkTw3WcT9BMu2bV4wd4yoqtl5HPyaq7UmF05hE0RDV89FUWNo6nTA5k4E~

The applet is used by many pages, where fields are passed to the applet for
encryption, and the encrypted string is appended to the URL. A section of the
code is:

try
{

.....

SOME ENCRYPTION......

....

queryStr = "ENCRYPTED_DATA=" + base64Encode(queryStr);

// Construct the query URL and open a URL connection
//***************************************************
// To change protocol field of URL to http or https
// depending on whether running under SSL or not
// CHANGE HERE
//***************************************************


url = new URL("http", getCodeBase().getHost(), port, PRIVYLINK_CGI_PATH
+ queryStr);

System.out.println("CRYPT : " + queryStr);
System.out.println("SENT : " + url);

// Receive the response HTML page
getAppletContext().showDocument(url,"_self");
System.out.println("retrieved document");
}
catch (Exception e)
{
System.out.println("Inside catch exception block");
System.out.println("Exception: " + e);
e.printStackTrace();
}
}

(println for debug purpose)

This code works in Netscape 4.7 on Mac in all pages except one. All the pages
pass parameters to the applet to generate an encrypted string. However for some
reason, it does not work on this single page on Macintosh OS9 Netscape.

There are no exceptionas at any point, and the browser does not throw any
errors, it just does not submit the URL.

Could it be the showDocument() method clashes with some other plugin or
something? I can not figure out why the same applet code fails for one page and
not another, when they are both essentially the same, except the length of the
URL. Does the Macintosh JVM have a maximum length of a URL or name-value pair?



Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us