Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #26446


    We have an architecture with apache tomcat and tomcat have to pass through a proxy.

    In developpement environnement with only tomcat everythning works fine. In validation environement with Apache and proxy it doesn’t work.

    When we use P4ML.render with a array of url, we have noting displayed in the pdf.

    When we use HttpClient (code below), the html works but we don’t have the images.

    HttpState initialState = new HttpState();

    // Initial set of cookies can be retrieved from persistent
    // storage
    // and re-created, using a persistence mechanism of choice,
    Cookie mycookie = new Cookie(u.getHost(), “JSESSIONID”, sessionId, “/”, null, false);

    // and then added to your HTTP state instance

    // Get HTTP client instance
    HttpClient httpclient = new HttpClient();
    //httpclient.getHostConfiguration().setProxyHost(new ProxyHost(“dmz-proxy”,8888));

    // RFC 2101 cookie management spec is used per default
    // to parse, validate, format & match cookies

    // Get HTTP GET method
    GetMethod httpget = new GetMethod(strURL);

    // Execute HTTP GET
    int result = httpclient.executeMethod(httpget);

    charset =httpget.getResponseCharSet();
    string.append(new String(httpget.getResponseBody(), charset));

    Can you correct the problem and use httpclient for your connections ?


    Kefah & Jean-Paul


    Try to propagate session ID with PD4ML requests. There is an API call intended for that:

    pd4ml.setCookie( “JSESSIONID”, cookieValue );

    where cookieValue is something like that: “9034657927465;path=/”



    Thanks for your response.
    But it is not a cookie problem, we have no problem with the session. The problem is for pd4ml to go through our proxy.

    best regards,


    You may specify proxy server address an port with the standard way for Java applications – usin http.proxyServer and http.proxyPort environment variables.

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

The forum ‘Troubleshooting’ is closed to new topics and replies.