Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getProtocol() problem

 
Mike London
Ranch Hand
Posts: 1224
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();
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic