This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin for Android App Development and have Peter Sommerhoff on-line!
See this thread for details.
Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • 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:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

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: 5235
143
  • 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: 5235
143
  • 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.
 
Marshal
Posts: 67226
170
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: 2353
293
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.
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!