I am creating a PDF from a servlet and I am trying to figure out how to
set the header for the top of the output as far as the title on internet
explorer where in regular servlet you would do the following for a Hello
WWW title.

 

 

import java.io.*;

import javax.servlet.*;

import javax.servlet.http.*;

 

public class HelloWWW extends HttpServlet {

  public void doGet(HttpServletRequest request,

                    HttpServletResponse response)

      throws ServletException, IOException {

    response.setContentType("text/html");

    PrintWriter out = response.getWriter();

    out.println("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 " +

                                        "Transitional//EN\">\n" +

                "<HTML>\n" +

                "<HEAD><TITLE>Hello WWW</TITLE></HEAD>\n" +

                "<BODY>\n" +

                "<H1>Hello WWW</H1>\n" +

                "</BODY></HTML>");

  }

}

 

 

 Marvin Thomas

E-Systems Developer

9911 Old Baymeadows Rd

Jacksonville, Fl 32256

(904)997-2913

 

This email and any files transmitted with it are confidential and
contain privileged or copyright information. You must not present this
message to another party without gaining permission from the sender. If
you are not the intended recipient you must not copy, distribute or use
this email or the information contained in it for any purpose other than
to notify us. If you have received this message in error, please notify
the sender immediately, and delete this email from your system. We do
not guarantee that this material is free from viruses or any other
defects although due care has been taken to minimize the risk.

 

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to