This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
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

Plz tell me something

 
Maki Jav
Ranch Hand
Posts: 447
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to ask that how to use code base? Well the problem is, I have an Applet that is accessing data from databse on the same pc. I am using a Servlet for it, but when I try to access it from network, the applet is displayed, but no data is fetched. The Url is applet uses is localhost:8080
So I want...
1) Deeper understanding of code base...how to know what to write in this tag.
2) How to make data accesible to other pcs on the intranet.
Thanx in Advance
 
Sanjeev Kaushik
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because of the security reasons Applet can contact only that machine from where it has come.
Consider an example
There are two domains
www.html.com : Where html pages are lying
www.applet.com : Where applet class/jar file is lying.
In that scenario your code base would be www.applet.com and document base for the applet would be www.html.com (html pages which are containing applet). Your html tag would like this
<applet codebase="http://www.applet.com" width=100 height=100></applet>
In that situation, though the url in browser is related to domain www.html.com, but your applet can make a request to www.applet.com.
I think this would make you understand the security policy of applet.
Hope its clear.
Regards,
Sanjeev
 
Maki Jav
Ranch Hand
Posts: 447
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Sanjeev, your have been a lot of help,
Pls whould to put your comments and this subject from time to time as you come across more info.
For example if the applet is in folder "a" and the html page is in folder "b" of the same directory, how would they relate? would I use codebase= "./a" in that file
Thanks in advance
Maki Jav
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic