Solved

Download JSP file from browser

Posted on 2003-10-31
8
602 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
 
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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

708 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now