Few questions about applet's capabilities


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Few questions about applet's capabilities

  1. #1
    Join Date
    Feb 2007
    Posts
    1

    Few questions about applet's capabilities

    Hi everyone.
    I've almost finished reading book "Java J2SE5 Complete Reference" but something is bothering me about applets and its capabilities, because I don't think that they exist only to provide graphical some experience.

    I want to write program that would run on client side, which would get some URL address that user specifies in say some input box, then get that HTML page (which is not in document or code base directory) process it in some way, and then display it as such back to user (in browser). For example I would make an HTML page which would call my applet (it is even possible that user could manually download HTML page which calls applet, along with applet itself as a ZIP archive, and unpack it somewhere on disk), and if user in applet's input text box for example enters "www.google.com/", then applet would get that page from google (say index.html) somehow process it (for example it may put single string "From within applet" above google's logo) and then present it to back user in his browser.

    Now, because this operation would be used frequently it is not practical to ask user for permission (it would right?) every time applet need to get some external HTML page, so my questions are:
    1. Can an unprivileged applet read some external HTML page?
    1a. If it can, then how, and how could I present it back to user since I it does not have privilege to write it in document or code base directory and call "showDocument" on it?
    2. If it cannot be done using applets, can it somehow be done with Java generally, whose user interface would be from within browser (not to be dependent on some of them like Internet Explorer or FireFox for example) ?
    3. If it cannot, can you please give me some advice and clues as at what should I look at, if it is primary that program runs on client side (it might be some processor expensive work and cannot afford lots of clients on server) and that code of program itself is at least not so easily visible (like in some kind interpreted script) that is to be protected at some level?

    Thanks in advance.

  2. #2
    Join Date
    Mar 2004
    Posts
    635
    So you want an applet that loads webpages? Rather pointless but it can be done easily. As far as priveleges go, I can't really say on that matter. I'm sure its possible but not without a little work. Since you want this applet to run from the client's computer rather than on some website then you should make an application rather than an applet. As a side note, you can rename an html file as .hta and the page will load like stand-alone appliaction rather than a browser window.

    Simply put, you just want to create a java-based web browser?

Similar Threads

  1. Replies: 0
    Last Post: 12-16-2006, 03:04 AM
  2. Replies: 0
    Last Post: 04-17-2006, 08:04 AM
  3. randomly select quiz questions
    By galgal5814 in forum ASP.NET
    Replies: 5
    Last Post: 03-10-2006, 12:10 PM
  4. Replies: 13
    Last Post: 05-23-2005, 06:22 PM
  5. Multiple Applets
    By Mr. Ed in forum Java
    Replies: 0
    Last Post: 11-14-2000, 11:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center