Java, Struts, X11 Dependencies

Discussion in 'Java' started by Greg, Jul 20, 2003.

  1. Greg

    Greg Guest


    I'm having a problem with a Java server-side app using struts.

    I get my app's login page (JSP) but when struts forwards me to
    the next page (a "Hello World" JSP page), I get a whole mess of
    X11 exceptions:

    Xlib: connection to "localhost:10.0" refused by server
    Xlib: Invalid MIT-MAGIC-COOKIE-1 key
    15:38:03,146 ERROR [Engine] ApplicationDispatcher[/codatest]
    Servlet.service() for servlet jsp threw exception
    org.apache.jasper.JasperException: Can't connect to X11 window server
    using 'localhost:10.0' as the value of the DISPLAY variable.
    at org.apache.jasper.servlet.JspServletWrapper.service(
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(

    I've discovered I can work-around the probem by logging into
    my server box with "ssh -X" which does something with the X11

    Why are there X11 dependency issues at all? My server (JBoss)
    is running the JVM in -server mode, and I'm not aware of any
    built-in dependencies in tomcat or struts. What's all this stuff
    about DISPLAY variables in the exception message?

    This trivial example actually does return my page content,
    but a more complex page (the real page I want) fails to show
    anything at all int the browser. In all cases I get reams of
    these X11/display errors.

    Any advice or explanation would be greatly appreciated as my
    boss is getting a tad "eager" for an explanation!


    ps. Here's the JSP for the page that's causing the problems:

    <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
    <head> <title><bean:message bundle="title"
    <h2>Made it!</h2>
    Greg, Jul 20, 2003
    1. Advertisements

  2. Greg

    winbatch Guest

    Not sure, but login to your server box and type
    xhost +

    winbatch, Jul 21, 2003
    1. Advertisements

  3. Marco Schmidt, Jul 21, 2003
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.