Hi Chandra,
Unfortunately there isn't an easy way to achieve this right now.  There are
two approaches you can take:
- Set the output directory of the non-GWT project to
/somewhere/somewhere/pathToGwtProject/war/WEB-INF/classes, or
- Package the non-GWT project into a JAR, and place that into
/somewhere/somewhere/pathToGwtProject/war/WEB-INF/lib

jason

On Sun, Jun 21, 2009 at 8:57 AM, Chandra <chandrasekar.tho...@gmail.com>wrote:

>
> (I'm writing this post after searching through different post and yet
> to find a solution to my problem!)
>
> I added a (Non-GWT, but JAVA) project as a dependent for a GWT project
> - the source is built successfully, but while running in hosted mode,
> the GWT project could not locate the classes of the Non-GWT project
> code.
>
> And yes, I tried all options like adding a ',gwt.xml' file and adding
> the <source> tag etc.
>
> The code is very simple:
>
> Non-GWT project
> -------------------------
> package com.chumma;
>
> public class AddClass{
>        public int add(int a, int b){
>                return a+b;
>        }
> }
>
> GWT-Project (Added the previous project as a dependent and also added
> entries in classpath of Run conf)
> -------------------
> import com.person.client.GreetingService;
> import com.chumma.AddClass;
> import com.google.gwt.user.server.rpc.RemoteServiceServlet;
>
> /**
>  * The server side implementation of the RPC service.
>  */
> @SuppressWarnings("serial")
> public class GreetingServiceImpl extends RemoteServiceServlet
> implements GreetingService {
>
>        public String greetServer(int a, int b) {
>
>                AddClass myAddClass = new AddClass();
>                int c=myPerson.add(a,b);
>                System.out.println("c = " + c);
>                return Integer.toString(c);
>        }
> }
>
> I'm referencing the "AddClass" *ONLY* from the server code and thus,
> the "AddClass" need not be compiled to Javascript.
>
> Can someone please point to where I'm going wrong?
>
> Chandra
>
> >
>

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

Reply via email to