Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

href to a remote file  RSS feed

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Morning,
I would like to know if it is possible to make a href in a jsp page referencing to a file in the server where de web app is deploy.
Something like that:

<a href="ftp://user:pass@ipServerMachine/home/stat/docs/MyDoc.doc"></a>

Thanks, best regards.
 
Saloon Keeper
Posts: 4331
108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's easy to try, isn't it?

JSP is just a way of generating HTML, so this is really a question about HTML - I'll add the question to that forum.
 
Jorge Bartolomé
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Moores wrote:That's easy to try, isn't it?

JSP is just a way of generating HTML, so this is really a question about HTML - I'll add the question to that forum.




Hi Tim,
Sorry I didnt make clearly myself.
The code Ive already written, didnt work. What I want to know is if Im missing something in the href.
Thanks!
 
Tim Moores
Saloon Keeper
Posts: 4331
108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see. What does "didn't work" mean, exactly - what happens? Any messages in the browser console?
 
Jorge Bartolomé
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Moores wrote:I see. What does "didn't work" mean, exactly - what happens? Any messages in the browser console?



No errors, but It doesn't show neither a document.
Do you know if does it possible to access a remote doc this way? Thats the question!
Afer that, we will check the errors if there will be any.
 
Author and ninkuma
Marshal
Posts: 66532
160
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are you hoping that the ftp:// protocol will do for you? It will not initiate an FTP transfer. Any reason not to just go with http://?
 
Saloon Keeper
Posts: 1795
238
Android Angular Framework Eclipse IDE Java Linux MySQL Database Redhat TypeScript
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Jorge Bartolomé wrote:


I doubt any current browsers will support credentials in the URL - regardless of the scheme.  Most likely, you will be prompted for a username and password.

Try putting ftp://user:pass@ipServerMachine/home/stat/docs/MyDoc.doc in the address bar and see what happens.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!