eclipse plugin and j2ee

5 views
Skip to first unread message

Hank

unread,
Aug 12, 2009, 9:00:27 AM8/12/09
to Google Web Toolkit
We're in the process of migrating a large application (well, a
collection of applications, really -- we're decomposing a very big
webapp along business process lines) from jsp/tomcat with a little bit
of ajax to all-gwt, and are having difficulty setting things up in
eclipse. If we set the project up as a dynamic web project, some gwt
modules fail in various ways. If (and this is what we prefer) we set
the project up as a gwt project, there doesn't seem to be any way to
associate the project with tomcat. What we'd like to be able to do is
to run/test/debug gwt in the normal way and also run/test/debug
conventional jsp's on a local tomcat from within the same project.
This because we're trying to move incrementally -- convert/integrate
one bit of an application, then the next, then the next, repeat until
done.

Ideally, we'd also be able to transparently deploy gwt modules to the
local tomcat and run/test/debug gwt integrated with the jsp's. Am I a
cockeyed optimist, or is this feasible?

Keith Platfoot

unread,
Aug 13, 2009, 12:11:07 PM8/13/09
to Google-We...@googlegroups.com
Hi Hank,

It should be possible to use GWT and the Eclipse plugin with a J2EE project.  You said if you create the project as a dynamic web project, some GWT modules fail.  By "GWT modules", do you mean GWT functionality within the plugin, or "modules" as defined by GWT?  The Eclipse plugin does support enabling GWT for an existing project, as long as your project has a 'war' directory.  I'm not sure about going in the other direction, though: creating the project as a Web Application project and then enabling J2EE features on it (such as associating it with a Tomcat server).  Could you elaborate a bit on what sort of failures you're seeing?

Depending on your setup, the integration might be easier if you are willing to use 2 projects, one with your GWT code and one with your JSPs and server code.  GWT supports debugging against a separate backend, so it should be able to run/debug GWT code alongside your JSPs hosted by Tomcat.

You'll need to do is start the Tomcat server first (debug or run mode should be fine).  Then in your Google Web Application launch config, uncheck the box on the Main tab labelled 'Run built-in server' and change the URL in the GWT tab to the address of your Tomcat server.  When you start the Web Application launch configuration, the GWT hosted mode shell will hit your Tomcat server, but still provide full debugging functionality for your GWT code.

If you can let me know more about your application setup and more details about the problems you're running into, we'll see if we can get something figured out.  Thanks,

Keith

Hank

unread,
Aug 15, 2009, 6:39:13 AM8/15/09
to Google Web Toolkit
Thanks Keith. The 2-project solution doesn't sound too promising.
We're partitioning the original big application along business rather
than technical lines, so we'd be looking at gwt and j2ee projects for
each business area. In the long run, we'd expect to drain everything
out of the j2ee projects, but the long run could be a couple of years
-- some areas will be converted lazily (i.e. we may not convert until
we have to modify or until we have a lot of time on our hands, which
is never).

I'll try to reply with a more complete explanation of our current
structure next week.

On Aug 13, 12:11 pm, Keith Platfoot <kplatf...@google.com> wrote:
> Hi Hank,
> It should be possible to use GWT and the Eclipse plugin with a J2EE project.
>  You said if you create the project as a dynamic web project, some GWT
> modules fail.  By "GWT modules", do you mean GWT functionality within the
> plugin, or "modules" as defined by
> GWT<http://code.google.com/webtoolkit/doc/1.6/DevGuideOrganizingProjects....>?
>  The Eclipse plugin does support enabling GWT for an existing project, as
> long as your project has a 'war' directory.  I'm not sure about going in the
> other direction, though: creating the project as a Web Application project
> and then enabling J2EE features on it (such as associating it with a Tomcat
> server).  Could you elaborate a bit on what sort of failures you're seeing?
>
> Depending on your setup, the integration might be easier if you are willing
> to use 2 projects, one with your GWT code and one with your JSPs and server
> code.  GWT supports debugging against a separate backend, so it should
> be able to run/debug GWT code alongside your JSPs hosted by Tomcat.
>
> You'll need to do is start the Tomcat server first (debug or run mode should
> be fine).  Then in your Google Web Application launch config, uncheck the
> box on the Main tab labelled 'Run built-in server' and change the URL in the
> GWT tab to the address of your Tomcat server.  When you start the Web
> Application launch configuration, the GWT hosted mode shell will hit your
> Tomcat server, but still provide full debugging functionality for your GWT
> code.
>
> If you can let me know more about your application setup and more details
> about the problems you're running into, we'll see if we can get something
> figured out.  Thanks,
>
> Keith
>
Reply all
Reply to author
Forward
0 new messages