Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6701768
Votes 0
Synopsis Desktop Integration : Applet should be alowed to connect to server where it's hosted/orginated
Category java_plugin:plugin2
Reported Against
Release Fixed 6u10(b26)
State 11-Closed, Verified, bug
Priority: 3-Medium
Related Bugs
Submit Date 13-MAY-2008
Description
Applet, when laucnhed from desktop shortcut ,should be allowed to connect to webserver where it's hosted/originated. For example if applet is hosted on server "ABC" and trying to read and write to socket on this webserver, then it should be allowed. It's working fine for applets running inside the browser or dragged out of the browser but not for applets launched from Desktop shortcuts. it's working fine when applet JNLP is launched using javaws.

Steps to reproduce:
1) Load following applet inside the browser
http://nicole1.sfbay.sun.com:8080/plugin_tests/JNLPSupport/AppletCommunication/html/TalkinApplet.html
2) Enter Port "51135" inside the TextField and press "Connect" and make sure that applet is getting connected successfully 

3) Drag applet out of the browser and close the browser or refresh the browser.
4) There should be pop-up to create a shortcut. Click "OK" and make sure that shortcut is getting created 
5) Launch the same applet from desktop. Try to make connection my entering the port "51135" and if it fails to make connection then bug is reproduced
Posted Date : 2008-05-13 22:39:44.0
Work Around
N/A
Evaluation
The reason this test case was failing was due to a mismatch in how the
JNLP2Manager reported the codebase for applets relaunched from a
desktop shortcut. The Plugin2Manager base class currently computes the
codebase in all cases, and its computation is predicated on the web
browser being present. When the JNLP-based applet is relaunched from a
desktop shortcut, the codebase needs to come from the JNLP file. For
this reason we need to override getCodeBase() in the JNLP2Manager to
return the value that is computed from the JNLP file's contents. Note
that the JNLP2Manager's codebase computation already takes in to
account the codebase that comes from the web browser if it is
available (and if it is not overridden by the presence of an absolute
codebase in the JNLP file), so overriding getCodeBase() in the
JNLP2Manager works both for the case where the JNLP-launched applet is
run within the web browser as well as when it is relaunched via the
desktop shortcut.

Also cleaned up some printlns during the jar verification and patching
phases for JNLP-launched applets, and added debugging code (covered
under the existing JAVAWS_TRACE_NATIVE environment variable) for the
case of relaunching an dragged-out applet from a desktop shortcut.

Tested with the given test case as well as with other JNLP-based
applets to verify no regressions.
Posted Date : 2008-05-20 01:13:55.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang