From kelly@retrotech.com Tue Feb 20 22:05:00 2001 Return-Path: Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 75336 invoked from network); 20 Feb 2001 22:05:00 -0000 Received: from dmz-gw.retrotech.com (HELO retro-mail.fish.retrotech.com) (@216.42.134.50) by h31.sny.collab.net with SMTP; 20 Feb 2001 22:05:00 -0000 Received: by retro-mail.fish.retrotech.com with Internet Mail Service (5.5.2650.21) id <17JBLWBC>; Tue, 20 Feb 2001 16:57:08 -0500 Message-ID: <118B167713D8D4119DB500A0C9C5437F1F03B3@retro-mail.fish.retrotech.com> From: "Kelley, Jeff" To: "'tomcat-user@jakarta.apache.org'" Subject: servlet not quite working Date: Tue, 20 Feb 2001 16:56:58 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N I am trying to run a servlet that will pop an xterm up on the remote computer. I do not get an error when compiling or calling the servlet, but I don't get the xterm to pop up. Here is the java file I am using: import java.io.IOException; import java.io.PrintWriter; import java.util.Enumeration; import javax.servlet.*; import javax.servlet.http.*; public class TestServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out = response.getWriter(); response.setContentType("text/plain"); // Create command sring to run on server. request.getRemoteAddr() will // get you the ip address of the remote machine. The :0 sets the display number // String[] callAndArgs = { "/usr/bin/X11/xterm", "-display " + request.getRemoteAddr() + ":0 &" }; // Some output to what we are doing out.println("Test Servlet"); out.println("Remote Addr: " + request.getRemoteAddr()); out.println("Remote Command: " + callAndArgs[0]); out.println("Remote Command Args: " + callAndArgs[1]); out.println("If this works you should see an xterm"); out.println("Is you xserver running?( exceed maybe)"); // Get a our runtime object, then execute a process using our command st ring Runtime rt = Runtime.getRuntime(); Process p = rt.exec(callAndArgs); } } and here is the output I get: Test Servlet Remote Addr: "correct ip address" Remote Command: /usr/bin/X11/xterm Remote Command Args: -display "correct ip address":0 & If this works you should see an xterm Is you xserver running?( exceed maybe) Any ideas as to why I never get the actual xterm to popup on my computer?