• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

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: 4701
117
  • 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: 4701
117
  • 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: 66787
168
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: 2022
273
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.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!