Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 730339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T06:54:02+00:00 2026-05-14T06:54:02+00:00

I am developing a web-app where I want to provide a download link to

  • 0

I am developing a web-app where I want to provide a download link to users – so they can download a zip file from my server.
Now, my requirement is that I want to execute some processing logic contained in a servlet before displaying the file dialog to the user for ‘zip’ files.

So If I write

<a href="abc.zip".......>

then it opens a file dialog asking the user to select the location where this file can be saved

But if I want a servlet’s doGet method to do some preprocessing – say like building the zip file , then how can I first call the servlet and then open the file dialog.

Will the following snippet work?

 <a href="MyHandlerServlet;abc.zip".......>

Thanks for your help !!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T06:54:02+00:00Added an answer on May 14, 2026 at 6:54 am

    I would rather pass the filename as pathinfo instead of request parameter, e.g.

    <a href="MyHandlerServlet/abc.zip">
    

    Otherwise a certain widely used webbrowser developed by a team in Redmond (cough) would use MyHandlerServlet as filename during Save As. When passing the filename as pathinfo, you can obtain the requested file in the servlet by:

    String filename = request.getPathInfo();
    

    You only need to map the servlet on /MyHandlerServlet/* instead of /MyHandlerServlet. Also see this basic servlet example.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing web app that user can save his/her work to server. The data
I am developing a MVC 3 Web app and I want to create something
we're developing a web app to cover all aspects of a printing company from
I'm developing a web app and currently using sql server 2008 for it. But,
I'm developing a web app for iOS devices, and want to have a header
Quick question: Will KnockoutJS provide a solid ground for developing a large web app?
I am developing web forms app in C# Framework 3.5 I want to build
I am currently using Twitter Bootstrap in developing an web app. Now I also
I'm developing a web app which allows users to upload images. Instead of forcing
I am developing a web app and want to be able to stagger the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.