• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to connect UNIX server using Static Web page and download xls file.

 
v arora
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want
1.One Static page with hyperlink
2. this hyperlink will allow user to connect to some Unix server and access a report from a particular directory.
3. This should allow the user to download that file (xls) locally.
4. How can I authenticate user while connecting to this Unix server.

Kindly suggest..How to do that.
 
Stefan Evans
Bartender
Posts: 1743
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
- Make the hyperlink an ftp link to the file you need to download
- set up ftp on the unix server to authenticate the user.
- job done.

 
Joe Areeda
Ranch Hand
Posts: 331
2
Java Netbeans IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stefan's method will certainly work. I tend to disable ftp on my servers for security reasons but that's also because I find I don't really need it bad enough to really lock it down to minimal access.

Pretty much any of the http security methods will work in this case I'd probably use basic auth as it's the easiest to set up. It's a bit different on different webservers but a google search for basic auth or htpasswd gives me lots of hits. You didn't mention which web server you are using so more details will probably just be confusing.

Assuming you don't have very many authenticated users either of these is fine but you have to set something up for each one.

Joe
 
Karthik Jayachandran
Ranch Hand
Posts: 91
Android Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Assuming the web-app is intend to run in LAN environ, you could create a JSP/servlet that would LIST all files in the mentioned folder of that server. Clicking the link could direct to a JSP/servlet which specifies
1. content-type,
2. sets header part (ie. filename),
3. Reads file and writes to the response (standard file writing while loop)
4. flush and close response
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic