Re: Trying to use server in another module
I have been making changes to the XML files and now it doesn't work again. I think I left them like they were, but now when trying to debug in a JBoss server I get the following error: java.net.factoryurlclassloa...@4e33e7 x.gwtlogin.server.GwtLoginServiceImpl java.lang.ClassNotFoundException: x.gwtlogin.server.GwtLoginServiceImpl ... This actually makes more sense than the previous behaviour, GwtLoginServiceImpl is not in the project. On 8 abr, 18:52, Ivan M wrote: > Sorry, too fast. I made it work including "x.gwtlogin" in "x.dt" as a > module with no entry point. I didn't need to copy theserverclasses, > so I have a singleserveras I wanted. > > On 8 abr, 17:28, Ivan M wrote: > > > > > Hello all, > > I'm facing my first GWT development. I had the idea of developing a > >projectwith a module which I have called "x.gwtlogin". Theserverof > > this module can perform queries on a LDAPserver. My idea is to have > > an instance of this module running in the applicationserverand use > > itsserverfrom any other GWT application I develop. > > Let's say one of these applications is "x.dt". I have copied all > > "x.gwtlogin.client" classes that implement theserver'sinterfance in > > this application, so now I have two client packages in theproject: > > > x.dt.client > > x.gwtlogin.client > > > The problem is that when debugging in hosted mode wherever I try to > > use a "x.gwtlogin.client.Class" in a "x.dt.client.Class", I get the > > following error: > > > [ERROR] Line 20: No source code is available for type > > x.gwtlogin.client.Class; did you forget to inherit a required module? > > > I suppose the problem is that GWT is not compiling and including the > > classes in "x.gwtlogin.client" when building "x.dt.client". What can I > > do?. Is what I intend to do possible at all?. > > > Thank you, > > Ivan- Ocultar texto de la cita - > > - Mostrar texto de la cita - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: how to make gwt eclipse plugin compiler see other projects
Could you (or somebody) be more specific about this?. I can't run the project in hosted mode, I get the following error: java.lang.IllegalStateException: No such servlet: GwtLoginService The service is in another project and it looks like it isn't started when starting the main project. I have ticked the GwtLogin in Eclipse's Project References of the main project. Also, I have added this to the "web.xml" of the main project: gwtLoginServiceImpl x.gwtlogin.server.GwtLoginServiceImpl GwtLoginService /gwtlogin/GwtLoginService I have copied the module from GwtLogin to the main project, excluding the server implementation. Thank you, Ivan On 17 abr, 17:31, Jason Parekh wrote: > BTW, another related issue when dealing with dependentprojectsis > ensuring GWT inheritance is defined properly. > > For example, imagine project A has a GWT module MA and project B has a > GWT module MB. If the types in MA refer to the types in MB then MA > must inherit from MB. > > To properly configure, please ensure that: > - the Java project A depends on the Java project B in Eclipse, and > - MA's XML file declares its inheritance of MB > > jason > > > > On Fri, Apr 17, 2009 at 11:19 AM, Jason Parekh wrote: > > Hey Joe, > > > It looks like you're hitting an issue where the Eclipse plugin does > > not include a dependent project's compiled classes into the packaged > > WAR that is deployed to the server. We're aware of the issue and it > > will be fixed in a future release. > > > There are a couple workarounds, one of which you've tried (package the > > dependent project into a JAR, and statically link that into the main > > project). The other is to set the dependent project's output > > directory to the main project's output directory. When the hosted > > mode server runs (or the app engine tools upload to app engine), all > > classes in this directory will be included (including the dependent > > project's). > > > jason > > > On Fri, Apr 17, 2009 at 8:31 AM, Joe Hudson wrote: > > >> Thank you Salvador for your reply, > > >> I am have tried that (I think) and that was when I experience > >> described above. Please let me explain how I am doing that because > >> maybe I am doing something wrong: > > >> 1) Open the Run Configurations menu > >> 2) Select my target under "Web Application" (with the google icon) > >> 3) Go to the "Classpath" tab, select "User Entries", click "Add > >> Project" and select my project > >> 4) Go to the "Source" tab, click "Add", select "Java Project" and > >> select my project > >> 5) Click "Apply" > > >> So, this is what I have tried and I get errors when Istartup the app > >> that it can not find the source of the classes from my server > >> project. Any ideas? > > >> Thanks > > >> Joe > > >> On Apr 17, 4:13 am, Salvador Diaz wrote: > >>> Add the other project to the classpath instead of adding the jar > > >>> On Apr 17, 7:10 am, Joe Hudson wrote: > > >>> > Hi, > > >>> > I have a separate eclipse project containing code used on the server- > >>> > side of the RPC. When I use the google plugin to recompile my GWT > >>> > app, I get the error messages saying that the source code can't be > >>> > found. I can get this to work by exporting the project to a jar (with > >>> > source) and referencing the jar (as opposed to the project directly) > >>> > in the classpath of the GWT project. > > >>> > This is do-able but I would really like to know if this is possible > >>> > and if there is anything special that has to be done for the plugin to > >>> > recognize the source from another project. > > >>> > I am pretty sure that the plugin sees the classpath as it is not > >>> > giving an error that the imported gwt.xml file can not be found. > > >>> > Thank you very much for any help you might have to offer. > > >>> > Joe- Ocultar texto de la cita - > > - Mostrar texto de la cita - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Trying to use server in another module
Sorry, too fast. I made it work including "x.gwtlogin" in "x.dt" as a module with no entry point. I didn't need to copy the server classes, so I have a single server as I wanted. On 8 abr, 17:28, Ivan M wrote: > Hello all, > I'm facing my first GWT development. I had the idea of developing a > project with a module which I have called "x.gwtlogin". The server of > this module can perform queries on a LDAP server. My idea is to have > an instance of this module running in the application server and use > its server from any other GWT application I develop. > Let's say one of these applications is "x.dt". I have copied all > "x.gwtlogin.client" classes that implement the server's interfance in > this application, so now I have two client packages in the project: > > x.dt.client > x.gwtlogin.client > > The problem is that when debugging in hosted mode wherever I try to > use a "x.gwtlogin.client.Class" in a "x.dt.client.Class", I get the > following error: > > [ERROR] Line 20: No source code is available for type > x.gwtlogin.client.Class; did you forget to inherit a required module? > > I suppose the problem is that GWT is not compiling and including the > classes in "x.gwtlogin.client" when building "x.dt.client". What can I > do?. Is what I intend to do possible at all?. > > Thank you, > Ivan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Trying to use server in another module
Hello all, I'm facing my first GWT development. I had the idea of developing a project with a module which I have called "x.gwtlogin". The server of this module can perform queries on a LDAP server. My idea is to have an instance of this module running in the application server and use its server from any other GWT application I develop. Let's say one of these applications is "x.dt". I have copied all "x.gwtlogin.client" classes that implement the server's interfance in this application, so now I have two client packages in the project: x.dt.client x.gwtlogin.client The problem is that when debugging in hosted mode wherever I try to use a "x.gwtlogin.client.Class" in a "x.dt.client.Class", I get the following error: [ERROR] Line 20: No source code is available for type x.gwtlogin.client.Class; did you forget to inherit a required module? I suppose the problem is that GWT is not compiling and including the classes in "x.gwtlogin.client" when building "x.dt.client". What can I do?. Is what I intend to do possible at all?. Thank you, Ivan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Approaches to develop a stateful application
On 31 mar, 11:34, Thomas Broyer wrote: > On 31 mar, 12:55, Ivan M wrote: > > Every request has to be secured and "verified" on the server side. > Whether you pass a login/password pair or a "ticket" (that could be > your session ID, managed "transparently" by your server's session > handling feature) doesn't change much things, you still have to pass > along something that the server can check to make sure you're > authorized to make such a request. > With an HttpSession, you let the server do this "verification" for you > (and associate data with this "session"), but be careful about CSRF, > as securing an app against CSRF needs client-server cooperation > (cookies and "tokens in URLs" aren't secure *at all* > > The thing is, a state-less server is (generally) easier to maintain > ("reacting" to a request only depends on the request and on the > server's "data", not any previous state associated with the "user > session") and easier to scale (first: no need to maintain "sessions", > so it consumes less memory; then: need two servers instead of one? > just add the second server and set up a load balancer, no need for > session-sharing between your servers or "sticky-sessions" at the load- > balancer level), among other things. > > But of course, YMMV. Thank you, Thomas. I perform authentication against a rather slow LDAP server, so I can't afford querying this server for every GWT request. I'm considering tickets but I still don't know how to implement it. I understand I can use the following as the ticket, so I don't need to pass an extra parameter: getThreadLocalRequest().getSession().getId() I don't want the trouble of storing tickets and their access permits in the DDBB. Since I read there is one instance of the server running for all clients, I suppose I can store them in a data structure in the server. How can I detect that a session has been closed or expired, to delete the record from the structure?. Thanks again. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Approaches to develop a stateful application
Being a newbie I can't fully understand the superiority of the client- side approach over Magius' session solution. As far as I understand, keeping the user's credentials in the client means they must be sent to the server and this must verify them in every service request. However, with Magius' solution, verification can be done once for the entire session. Where am I wrong?. Thank you, Ivan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---