Eros schrieb: > I know this is probably a very stupid question but please bear with > me. > > I'm trying to use the same class on server and client (so I don't have > to duplicate code): is it at all possible?
It is possible, but these classes have to reside in the client- package or in a package that is defined as source-package. E.g. I placed all the data-objects I exchange between server and client in a package com.example.data and added this package as source-package to the gwt.xml-file. My xml-file residing in the package/directory com.example.myapp looks like the following: ... <entry-point class="com.example.myapp.client.MyApp"/> <source path="client"/> <source path="data"/> ... That way I can disinguish between classes that really are intended for the client only by placing them into the client-package and classes that are shared by placing them into the data-package. This allows a easier routine when creating the WAR-file because you simply need to put the classes in data into the server-jar-file and leave away the classes residing in client. Regards, Lothar --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
