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

www.somehost.com/download.jsp

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

Thanks
LVL 3
DmitriyAsked:
Who is Participating?
 
net99onlineCommented:
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
0
 
dorwardCommented:
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.
0
 
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

Thanks
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

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

Vinny
0
 
dorwardCommented:
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.
0
 
VincentPugliaCommented:
Hi dorward,

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

Vinny
0
 
dorwardCommented:
VincentPuglia: I was referring to his comment, not yours.
0
 
VincentPugliaCommented:
sorry dorward :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.