Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #26218


    I am using a web Application on TOmcat 6.0.14. I passed the URL into the render function.
    The code is as follows.

    public void generatePdfInvoice(HttpServletRequest request , HttpServletResponse response) throws Exception{
    StringBuffer filename = request.getRequestURL();

    System.out.println(“The request URL is: ” + filename.toString());
    String file = filename.toString();
    File outputPDFFile = new File(“D://Stored_Invoices/Inv_no_” + this.getInvoiceID() + “.pdf”);
    String inputHTMLFileName = file + “?cmd=print&invoice_id=” + this.getInvoiceID();
    //URL url = new URL(“filename”);
    Dimension format = PD4Constants.A4; fos = new;
    PD4ML pd4ml = new PD4ML();
    pd4ml.setPageInsets(new Insets(20, 10, 10, 10));
    pd4ml.render(inputHTMLFileName, fos);

    It is giving the following error: Server returned HTTP response code: 500 for URL: http://localhost:8084/ManglamProj/vtsInvoice2.jsp?cmd=print&invoice_id=980
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
    at java.lang.reflect.Constructor.newInstance(
    at Method)
    at org.zefer.cache.c.getResourceAsBytes(Unknown Source)
    at org.zefer.html.doc.PD4MLHtmlParser.parse(Unknown Source)
    at org.zefer.html.doc.PD4MLHtmlParser.buildDocument(Unknown Source)
    at org.zefer.pd4ml.PD4ML.o00000(Unknown Source)
    at org.zefer.pd4ml.PD4ML.render(Unknown Source)
    at org.zefer.pd4ml.PD4ML.render(Unknown Source)

    What to do????


    As I see from the exception stack trace, an attempt to load source HTML from


    failed with error code 500. It is a problem of vtsInvoice2.jsp.

    Does the URL work if you open it with a web browser?

Viewing 2 posts - 1 through 2 (of 2 total)

The forum ‘HTML/CSS rendering issues’ is closed to new topics and replies.