• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

multipart download servlet

Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, so I have put together a login servlet which redirects back to itself with an incorrect login but that sends a multipart (using MIME) HTML document if the user is authenticated.

I know when many look at this the response may be "why didn't you use the O'Reily classes for this?". My reasons are a) I don't like the license restriction and b) I wanted to learn how to do it myself.

Anyways, the servlet responds and sends the multipart document to the Web Browser but the Web Browser doesn't know what to do with it (e.g. Firefox asks me if I want to download it), which suggests to me that I've obviously done something wrong because it should recognize it as a multipart document and attempt to load it. It is basically an HTML document with a Java Applet inside of it. Can anyone see where exactly in code I've made a mistake (or mistakes)? Any help would be most apprreciated.

Btw, when/if it works, we all have a servlet that doesn't require the O'Reily classes.

Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Multipart support is also available from Jakarta http://jakarta.apache.org/commons/fileupload. Without the gotta buy the book license.
You save more money with a clothesline than dozens of light bulb purchases. Tiny ad:
the value of filler advertising in 2020
    Bookmark Topic Watch Topic
  • New Topic