Hi Walden,Thanks for that. I'm going to give this a try and let you know
what I have. To clarify though, whenever we use the <source ="x"> tag in the
pkg1.gwt.xml, is there not a way to have this defined for a whole package as
opposed to each singular class? I would think that many large projects would
find this an annoyance if it had to be done for each class right? Or are
there are considerations I am not thinking about?

Suri

On Mon, Sep 29, 2008 at 8:47 AM, walden <[EMAIL PROTECTED]> wrote:

>
> Suri,
>
> If the current Java code is in the same project where you are adding
> GWT on the client, you don't need a jar.
>
> Your current Java code does have to be sanitized to meet the 'closed
> world' requirements of the GWT compiler.  Read the documentation on
> the GWT compiler and JRE emulation classes for details.
>
> Your current Java code will have to be findable by the GWT compiler,
> which means there must be a .gwt.xml file on the classpath when you
> run the GWT compiler (you'll need to create that), and it needs to
> indicate where the compile sources are.  There are basically two ways
> to approach this part:
>
> 1. keep your sources exactly where they are; place your Pkg1.gwt.xml
> file in the root folder of the smallest containing sub-tree for all
> the classes you need to include, and use the <source path="x"/> tag as
> many times as necessary to indicate (and hopefully isolate) just the
> classes you want compiled by GWT.
>
> 2. do a little folder reorganization so that the classes you will
> share between server and client side are isolated cleanly; have a
> 'client' folder at the root of that sub-tree, and place your
> Pkg1.gwt.xml file as a direct sibling to the client folder.  Then you
> don't need <source> tags.
>
> Try that, report any errors you get, and we'll sort it out from there.
>
> Walden
>
> On Sep 27, 3:30 pm, Suri <[EMAIL PROTECTED]> wrote:
> > Hi All,
> > I'm a GWT newbie and I've just come fresh after reading up the basics
> > from the Google GWT tutorial. Here's my situation:
> >
> > I have an existing Java based web application (Struts based). Now I'm
> > trying to add a new module to it and figure I'd try to incorporate GWT
> > - mostly because I expect the new module to be a few very dynamic
> > pages communicating with the server often.
> >
> > Now my first question is, how do I reference my current Java code in
> > this GWT program. i.e if i have the following
> >
> > com.pkg1.Class1;
> > com.pkg1.pkg2.Class2;
> >
> > in my existing Java code,
> >
> > and in my GWT java class I import these 2 classes for implementation,
> > what are the exact steps I need to follow so that these are correctly
> > added to the GWT program and can compile. So far, I haven't seemed to
> > have found a definitive answer to this problem. I saw a few solutions
> > of people saying a jar needs to be included and it needs to have a
> > <name>.gwt.xml file which gets inherited or something but didn't quite
> > understand what exactly they meant.Some others spoke about source code
> > having to be available for the program to compile in order to convert
> > the javascript. The reading ended up leaving me in a half baked
> > situation which still doesn't help my GWT program compile.
> >
> > I'd really appreciate some help and maybe a few fundamentals on what
> > needs to be happening.
> >
> > Thanks
> > Suri
> >
>

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to