Hi Kristian, here I send you some short pieces of my code to make the arquitecture of my application clearer :)
This is the class to initilize the window public class ListItems { List listOptions; private static ListItems instance; private Frame f; public static ListItems getInstance () { if(instance == null) { instance = new ListItems (); } return instance; } public void initWindow(int i) { if (i== 0){ f = new Frame(); listOptions = new List(); f.add(listOptions); listOptions.addItem("reqConn"); f.pack(); f.setVisible(true);} if (i!=0){ listOptions.addItem("reqConn2"); f.add(listOptions); } } This is the web services class: *public* *class* SDMInterfaceImpl *extends* Thread *implements*SDMInterface{ public ListItems list = ListItems (); *public* SDMInterfaceImpl() { } ** *public* *void* init(){ * *list.getInstance(); } *public* String reqConn(String src, String dst){ String result = ""; list.initWindow(0); *return* result; } *public* String reqConn2(String src, String dst){ String result = ""; list.initWindow(1); *return* result; } The client will call the methods reqConn and reqConn2 and on the window should appear these 2 messages: reqConn reqConn2 Is it clearer now? Do not look at the class, it is a simplification to show you how my application tries to work regards, Alicia On 3/8/07, Kristian Rink <[EMAIL PROTECTED]> wrote:
Alicia; ["Alicia Sánchez-Mora" <[EMAIL PROTECTED]> @ Thu, 8 Mar 2007 15:05:09 +0100] > I have the class Window to initialize the GUI and I call (locally) an > instance of this class from my service class. The problem, or at > least what I think the problem is, is that every time I make a call > the service container unloads my class and nothing (related to my > window) is initiallized. The idea is to run my window only one time, > when tomcat starts. To do that I should specify somehow on the > web.xml file to do this: write a jsp class, put it somewhere and call > the initialization of the window.. honestly, the architecture of your overall application by now seems somewhat obscure to me. What exactly do you intend to do? Is the "window" supposed to display the web service calls actually supposed to be a _desktop application_ window or rather an HTML page rendered by some JSP? If you want to build a GUI, probably you will have to build something like that: * Web Service and related classes deployed to a tomcat application context making use of axis and friends, and * GUI application, built as a standalone Java application making use of Swing(?) to render a GUI and using web service client classes to do remote calls. Can you be more verbose about your application architecture? :) Cheers, Kristian -- Kristian Rink * http://zimmer428.net * http://flickr.com/photos/z428/ jab: [EMAIL PROTECTED] * icq: 48874445 * fon: ++49 176 2447 2771 "One dreaming alone, it will be only a dream; many dreaming together is the beginning of a new reality." (Hundertwasser) --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]