Win a copy of Head First Android this week in the Android forum!
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • Al Hobbs
  • salvin francis

How can i read Serealized objects stream and pdf file stream simuntaneously in one servletconnection

Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have an applet which is communicating with the servlet .I have used the concept of serealization.Now my servlet is configure to read the contents as below

protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
try {
PrintWriter out = null;

InputStream in = request.getInputStream();
ObjectInputStream inputFromApplet = new ObjectInputStream(in);

Now to read pdf file from the servlet how can i set

So that it would work fine for both the serealized objects and pdf file.

i had used Jeditorpane previously,but it didint open pdf file.I searched on Java ranch and others sources all were saying that jeditorpane doenst support pdf file,we have to design parser for that.

Actually i have made an web based application which at front end uses applet and back end uses servlet.Now i want to provide help file in my project,as most application have.Help file, i have made in acrobat reader.Now i want to put one help file on server so that each client can get it at runtime(it would load at their machine from server).how can i do that?
Posts: 43027
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A servlet response can only contain a single type - you can't send both a serialized object and a PDF.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic