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. Advertising

  2. Greg

    winbatch Guest

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

    "Greg" <> wrote in message
    news:...
    > 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:2
    54)
    > 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>
     
    winbatch, Jul 21, 2003
    #2
    1. Advertising

  3. Greg:

    >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:


    See
    <http://www.geocities.com/SiliconValley/Lakes/6686/java-image-faq.html#x>.

    [...]

    Regards,
    Marco
    --
    Please reply in the newsgroup, not by email!
    Java programming tips: http://jiu.sourceforge.net/javatips.html
    Other Java pages: http://www.geocities.com/marcoschmidt.geo/java.html
     
    Marco Schmidt, Jul 21, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nebojsa Topolscak
    Replies:
    3
    Views:
    569
    Jon Caldwell
    Jan 14, 2005
  2. Robert Holt

    Getting X11 window id

    Robert Holt, Oct 16, 2005, in forum: Java
    Replies:
    5
    Views:
    2,588
    Robert Holt
    Oct 18, 2005
  3. Replies:
    2
    Views:
    2,162
  4. hrpreet
    Replies:
    3
    Views:
    38,046
    Gordon Beaton
    Apr 27, 2006
  5. Andrew
    Replies:
    14
    Views:
    1,530
    Andrew
    Jan 15, 2010
Loading...

Share This Page