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 {
response.setContentType("application/x-java-serialized-object");
PrintWriter out = null;
InputStream in = request.getInputStream();
ObjectInputStream inputFromApplet = new ObjectInputStream(in);
.................
....................
Now to read pdf file from the servlet how can i set
response.setContentType("application/pdf");
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?