Yes, by adding a gwt.xml file, you have basically created a module,  
but without an entry point defined the module cannot be compiled on  
its own, only inherited by other modules.

-jason
On Nov 12, 2008, at 9:15 PM, sriram wrote:

>
> Hi Jason,
>
> Thank you very  much.
> Correct me if i am wrong.
> Is this a similar way, to creating a module
>
> Jason Essington wrote:
>> sure, and in fact it is quite common to use the same code in both
>> places.
>>
>> The easy way to do this is to consolidate that shared code into a
>> particular package ... something like com.foo.bar.shared
>>
>> Then create a new GWT.xml file com/foo/bar.Shared.gwt.xml and add
>> <source path="shared"/>
>>
>> your module containing your entry point would then add <inherits
>> name="com.foo.bar.Shared"/>
>>
>> and your server code would just reference those classes like normal.
>>
>> The trick here is to remember to only place translatable code in
>> com.foo.bar.shared. Since it is going to be compiled to javascript,  
>> it
>> will have to abide by all of the rules of client code.
>>
>> -jason
>>
>> On Nov 10, 2008, at 9:47 PM, sriram wrote:
>>
>>>
>>> Hi,
>>>
>>> Do we use a common code written in java, that could be used at both
>>> the client and server side using gwt.
>>>
>>> for example, cache a common folder used at both the ends.
>>>
>>> Thanks,
>>> Sriram
>>>
>>>>
> >


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

Reply via email to