• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

HTML link

 
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I have a question about links to HTML in servlets. Do we just use directory like "c:/tomcat/login.html"? Or do we use links like "http://www.bob.com/login.html"?
 
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Bob,
Apart from http,the link (href portion in <a> html tag) can be other protocols also like file/ftp/mailto. I just cut and paste few examples from one of the HTML references I have.
regds
maha anna

 
Bob Moranski
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you maha! If I have <a href=\"c:/tomcat/login.html\">click here</a>. Can a remote client get it? If they can, will it be displayed as c:/tomcat/login.html and show them my directory heirachy?
 
maha anna
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You have to be very careful with the forward/backward slashes and use it appropriately. It may depend on read/write/execute permissions of the dir structure. If it has read permission for all the remote client can view the dir structure. Try it.
regds
maha anna
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Attn Maha Anna,
this is with regards to the query that bob has put forth.
My question is: Can a user access the physical file residing on the server using an anchor tag.
For ex: <a href="c:\amit\a.html">a.html</a>
"C:\" is the local directory of the server.
Similarly can he access other drives of the server.If so how please reply...Thanks in advance...
 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
You can't refer any drive of the server. if you give as c:\ it will refer only the local machine.
with regards
Prakash
 
reply
    Bookmark Topic Watch Topic
  • New Topic