aspose file tools*
The moose likes Servlets and the fly likes HTML link Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "HTML link" Watch "HTML link" New topic
Author

HTML link

Bob Moranski
Ranch Hand

Joined: Nov 22, 2000
Posts: 177
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"?
maha anna
Ranch Hand

Joined: Jan 31, 2000
Posts: 1467
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

Joined: Nov 22, 2000
Posts: 177
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

Joined: Jan 31, 2000
Posts: 1467
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
Sheldon Rego
Greenhorn

Joined: Nov 03, 2000
Posts: 12
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...
prakash muthu
Ranch Hand

Joined: Sep 06, 2000
Posts: 75
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


Prakash.M<BR>Bangalore- India<BR>(prakashem@rediffmail.com)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HTML link