Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

url problem

 
Samarth Barthwal
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello everybody,
I made the following applet but it gives me 3 error for the variable url1.why is it so?





I get the following errors:

1. url is already defined in init().
2. cannot find symbol variable getDocumentBase.
3. cannot find symbol url1.
 
Mani Ram
Ranch Hand
Posts: 1140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The error messages are very much self-explanatory. Aren't they?

1. url is already defined in init().
You are tyring to define a variable called url twice, which is illegal.


Rename it to url1, this will solve problems (1) & (3)

2. cannot find symbol variable getDocumentBase.
getDocumentBase() is a method. So the proper way to call it is
 
Samarth Barthwal
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Mani
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic