• 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

href to a remote file

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 7582
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 7582
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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://?
 
Marshal
Posts: 4491
572
VSCode Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic