Solved

how to display a dialog box that allows the user to specify the path and name the download file

Posted on 2008-09-29
5
225 Views
Last Modified: 2013-11-24
I have an J2ee application that need to allow users to export data to xml file to their local desktop. We need to open a dialog box that can allow user to browse their local drive to specify the directory and aslo be able to specify the new file name (the file is not exist on local yet). How can I achieve that in JSP page? Is there any built-in funtion?
0
Comment
Question by:AnnieDing
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 23

Expert Comment

by:Ajay-Singh
ID: 22603299
You have to set Content-Disposition header,

http://forums.devx.com/showthread.php?t=145024
0
 

Author Comment

by:AnnieDing
ID: 22605320
My question is not about downloading files. The application is using Marshaller to marshal all my object to a XML file. I want user to be able to select the directory on their local drive and also be able to specify the exported file name. How can I open up this kind of dialog box? I tried <html:file> tag, but it has to choose a existing file. I want user to be able to enter a new file name.
0
 

Author Comment

by:AnnieDing
ID: 22605387
In addition, I am asking how to open a download dialog box.
0
 

Accepted Solution

by:
AnnieDing earned 0 total points
ID: 22608315
I find the answer: using JFileChooser chooser = new JFileChooser();
0
 
LVL 23

Expert Comment

by:Ajay-Singh
ID: 22611388
> In addition, I am asking how to open a download dialog box.
I believe, thats done by browser.
0

Featured Post

Business Impact of IT Communications

What are the business impacts of how well businesses communicate during an IT incident? Targeting, speed, and transparency all matter. Find out more in this infographic.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
jar file executable 12 68
more than one jdk and one jre 1 60
tomcat not starting 6 96
Code Coverage and Coding Standards 2 82
I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

751 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