Solved

Download JSP file from browser

Posted on 2003-10-31
8
609 Views
Last Modified: 2010-05-18
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
0
Comment
Question by:Dmitriy
8 Comments
 
LVL 17

Expert Comment

by:dorward
ID: 9658811
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
 
LVL 3

Author Comment

by:Dmitriy
ID: 9658883
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
 
LVL 15

Expert Comment

by:VincentPuglia
ID: 9658995
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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 17

Expert Comment

by:dorward
ID: 9660221
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
 
LVL 15

Expert Comment

by:VincentPuglia
ID: 9660239
Hi dorward,

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

Vinny
0
 
LVL 1

Accepted Solution

by:
net99online earned 75 total points
ID: 9661639
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
 
LVL 17

Expert Comment

by:dorward
ID: 9662402
VincentPuglia: I was referring to his comment, not yours.
0
 
LVL 15

Expert Comment

by:VincentPuglia
ID: 9662805
sorry dorward :)
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Angular 2 - Issue in page Layout 2 60
Remove lines by logo 2 30
Where can I find... 1 34
ebay api to see some data about my customers 2 30
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question