Java, Struts, X11 Dependencies

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

  1. Greg

    Greg Guest

    Hello,

    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(JspServletWrapper.java:254)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
    [clip]

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

    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!

    Thanks
    Greg

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

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

  2. Greg

    winbatch Guest

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

     
    winbatch, Jul 21, 2003
    #2
    1. Advertisements

  3. Marco Schmidt, Jul 21, 2003
    #3
    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.