Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

Rohit kumar sharma
Posts: 16
  • Mark post as helpful
  • send pies
  • 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?
Ulf Dittmer
Posts: 42972
  • Mark post as helpful
  • send pies
  • 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.
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!