Download JSP file from browser

I know it's a long shot, but is there any way to download a jsp file from a browser? For example, when you type

the page won't open but ask you to download this jsp file.

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

That depends what you mean by the question...

* If you want to look at someone else's JSP without their help: Not possible
* If you want to have your own JSP download rather then run: Server configuration issue
* If you want the output of your own JSP to download rather then display: Set the content-type header to something suitable for the type of data you are sending.
DmitriyAuthor Commented:
I changed the association of the JSP file to open with the notepad.  Why is the browser still opening the page?  Shouldn't it display it in the notepad?  Can you explain how the opening of JSP takes place?  

I thought that if you associate any extension with any program, this extension will always be opened with this program

if the browser can open or execute a file extension, it will display the page.
if you want to download the file, zip it ( and then it will be downloaded.
if you want to view it in notepad, rename it *.txt

Starting with Angular 5

Learn the essential features and functions of the popular JavaScript framework for building mobile, desktop and web applications.

If its coming from a webserver, the file extension is irrelevent. Its the content type sent by the webserver that the system pays attention to.
Hi dorward,

  I'm presuming he wants to make code available for others, not download 'live' pages

the server pages like asp and jsp are processed on the hosting server beore they are sent to the user

there is no way that you can view the source code of the jsp file

you will only view the result of the page processing on the host server

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
VincentPuglia: I was referring to his comment, not yours.
sorry dorward :)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.