• Post Reply Bookmark Topic Watch Topic
  • New Topic

getProtocol() problem

 
Mike London
Ranch Hand
Posts: 1290
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sometimes in an applet, the code that reads the current protocol returns "file", which causes the servlet connection to fail.
The suspect code is:
URL currentPage = getCodeBase(); // get base URL of the applet
String protocol = currentPage.getProtocol();
String host = currentPage.getHost();
int port = currentPage.getPort();
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!