@@ -328,6 +328,8 @@ public class JDKInstaller extends ToolInstaller {
...
@@ -328,6 +328,8 @@ public class JDKInstaller extends ToolInstaller {
wc.setJavaScriptEnabled(false);
wc.setJavaScriptEnabled(false);
wc.setCssEnabled(false);
wc.setCssEnabled(false);
Pagepage=wc.getPage(src);
Pagepage=wc.getPage(src);
intauthCount=0;
inttotalPageCount=0;
while(pageinstanceofHtmlPage){
while(pageinstanceofHtmlPage){
// some times we are redirected to the SSO login page.
// some times we are redirected to the SSO login page.
HtmlPagehtml=(HtmlPage)page;
HtmlPagehtml=(HtmlPage)page;
...
@@ -338,10 +340,13 @@ public class JDKInstaller extends ToolInstaller {
...
@@ -338,10 +340,13 @@ public class JDKInstaller extends ToolInstaller {
Stringu=getDescriptor().getUsername();
Stringu=getDescriptor().getUsername();
Secretp=getDescriptor().getPassword();
Secretp=getDescriptor().getPassword();
if(u==null||p==null){
if(u==null||p==null){
log.hyperlink("/"+getDescriptor().getDescriptorUrl(),"Oracle now requires Oracle account to download previous versions of JDK. Please specify your Oracle account username/password.");
log.hyperlink(getCredentialPageUrl(),"Oracle now requires Oracle account to download previous versions of JDK. Please specify your Oracle account username/password.");
thrownewAbortException("Unable to install JDK unless a valid username/password is provided.");
thrownewAbortException("Unable to install JDK unless a valid username/password is provided.");
}
}
if(totalPageCount>16)// looping too much
thrownewIOException("Unable to find the login form in "+html.asXml());
try{
try{
// JavaScript check page. Just submit and move on
// JavaScript check page. Just submit and move on
HtmlFormloginForm=html.getFormByName("myForm");
HtmlFormloginForm=html.getFormByName("myForm");
...
@@ -354,6 +359,10 @@ public class JDKInstaller extends ToolInstaller {
...
@@ -354,6 +359,10 @@ public class JDKInstaller extends ToolInstaller {