O'Reilly logo

Struts 2 Design and Programming: A Tutorial by Budi Kurniawan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 13. File Download

This chapter discusses file download, an important topic that does not often get enough attention in web programming books, and how Struts supports programmatic file download by providing the Stream result type. Two examples illustrate the use of the stream result type.

File Download Overview

Downloading files is a day-to-day activity for an Internet surfer. Writing a web application that allows only authorized users to download certain files is a different story. A solution would be to use the operating system’s or the web container’s authentication system. This authentication mechanism lets you password-protect files so that file downloading is allowed only after the user has entered the correct user name and password. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required