Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

remote access by applet to http server

 
guru naan
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have written an applet that counts the words on a webpage i.e. converts the html file to a string then use stringtokeniser etc. However, the html file resides on the same server as the applet.
Is it possible to open a connection to another server i.e. a remote one such as www.yahoo.com/file.html and read this back - or is this illegal/possible.
Also, i would like to strip html tags from the string - anyone know how to do this?
Thanks.
 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In a word no. The applet can only "phone home" or connect to its original codebase.
With a certified or signed applet, or if the client machine has granted certain privaleges to the codebase or signer, then it may be able to connect to a different website.
Security is very tight with applets for obvious reasons. That is why it is said to run in "sandbox"
Hope this helps
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!