GWT Designer's web project capabilities

GWT Designer allows you to quickly create the modules, composites, panels, remote services and other elements that comprise Google Web Tookit applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

GWT Designer's web project capabilities

Postby stsch77 » Thu Mar 26, 2009 3:06 am

Hi,

if I have an Enterprise Application Project in Eclipse (resulting in an ear-file) and create a normal Web Project (static or dynamic) I can add the web project to the Enterprise Application Project. The result is an adaption of the application.xml (a web-module is added) and the contents of the web project is added to the resulting ear-file as a war-file.

It would be nice to have such an automatism for GWT Designer. This doesn't work if I use a GWT Web Project (that allows me to include a GWT module from a different GWT Java Project). Or did I oversee something?

There was a thread elsewhere (Packaging a GWT project in a Web Project WAR, viewtopic.php?f=11&t=2139) about the package structure generated by GWT Designer. To this issue
- - - - -
Right now GWT Designer always uses fully qualified module name during Web project packaging.
We are going to add option for with path to each included GWT module.
- - - - -
Konstantin Scheglov wrote that this is done and not an issue anymore. Where/How can I adjust these settings?

Kind regards,
-Steffen-
stsch77
 
Posts: 19
Joined: Fri Feb 27, 2009 10:31 am

Re: GWT Designer's web project capabilities

Postby Konstantin.Scheglov » Thu Mar 26, 2009 10:08 am

See attached screen shot with Web project properties, where you can add one/many GWT modules and specify output directory in WAR.
Attachments
Screenshot - 26.03.2009 , 21_07_38.png
Web project and GWT output.
Screenshot - 26.03.2009 , 21_07_38.png (43.13 KiB) Viewed 2216 times
Konstantin.Scheglov
Moderator
 
Posts: 186
Joined: Tue Oct 18, 2005 8:11 pm
Location: Russian Federation, Lipetsk

Re: GWT Designer's web project capabilities

Postby stsch77 » Fri Mar 27, 2009 12:03 am

Konstantin.Scheglov wrote:See attached screen shot with Web project properties, where you can add one/many GWT modules and specify output directory in WAR.


Sure. The point is that a GWT Web Project is not recognized as a web project as such by the Enterprise Application Project. If you rightclick on your EAR-Project and select "Java EE Module Dependencies" and select your GWT Web Project it is added to the ear file as a jar-file and there is not web-module element added to application.xml. In contrast to an "ordinary" web project created by Eclipse where the web project is added as war-file and the application.xml is modified accordingly. And that is what you would like to do, right? Have a GWT application as a war-file inside an ear-file.

Of course you can assemble everything with an Build-Tool like Ant. It would just be nice if the IDE provided such a feature out-of-the-box.

And again: How can I get rid of the fully qualifed module name during web project packaging?
stsch77
 
Posts: 19
Joined: Fri Feb 27, 2009 10:31 am

Re: GWT Designer's web project capabilities

Postby Eric Clayberg » Mon Mar 30, 2009 3:58 am

Our Web project is not WTP Web project, so it can not by used as if it is. We provide ours as a light-weight replacement for folks who do not want to have the entire WTP loaded. If you do wish to use the WTP, then you should use a real WTP Web project and not the light-weight variant provided by GWT Designer. If you do that, you can package your GWT code any way that you like, and a lot of advice for how you can do this is available on Google's GWT forum. That is beyond the scope of what we can help you with.

The screen shot posted earlier shows how the "output" folder can be changed in order to "get rid of the fully qualifed module name".
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: GWT Designer's web project capabilities

Postby stsch77 » Wed Apr 01, 2009 6:38 am

Eric Clayberg wrote:The screen shot posted earlier shows how the "output" folder can be changed.


Ok, yes you are right, that works.

In my opinion there is still one problem: The capabilities of GWT Designer stop at the integraion with Eclipse to generate an ear-file. Your are right that I can use a GWT Web Project (provided by GWT Designer) or a Dynamic Web Project (provided by Eclipse) as a container for a GWT project (with the necessity to do a few manual changes to the latter one); I can export everything to a war-file and it works fine. But if I have an Enterprise Application Project (a project containing a war file resulting in an ear-file) the contained war-file is just empty (if I don't have additional resouces inside my web-project) since the GWT compile process and the generation of the war-file is not performed. As said before: That's what you probably want to have - an ear-file containing a war-file containing the GWT-application. And right now I don't see how to achive this without using a separate build-tool like Ant.
stsch77
 
Posts: 19
Joined: Fri Feb 27, 2009 10:31 am

Re: GWT Designer's web project capabilities

Postby Eric Clayberg » Wed Apr 01, 2009 7:20 am

You can use the Deploy Module command to generate a WAR file.

Image

Actually, that command generates an ANT script which then generates the WAR file.

We generate an ANT script (as opposed to doing it all in a black box) so that the user can modify that script to meet any specific deployment needs.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: GWT Designer's web project capabilities

Postby eoriou » Mon May 25, 2009 5:42 am

I think we have the same problem. We want to create a standard J2EE application (an Enterprise Application Project and a Dynamic Web Project) and put our GWT Modules into it. Therefore, this solution is easier to manage J2EE security and so on. Apparently, it's possible to convert a Dynamic Web Project into GWT Project. Unfortunately, static resources and WEB-INF directory generated in war directory instead of WebContent directory. I think it's the default behavior of GWT 1.6. It would be very great, if we could define the output directory (-war option in GWT) in GWT Designer preferences (like Cypal Studio does). What do you think about that ?

Emmanuel
Eclipse 3.4 - GWT 1.6
eoriou
 
Posts: 19
Joined: Thu May 07, 2009 7:43 am

Re: GWT Designer's web project capabilities

Postby Eric Clayberg » Tue May 26, 2009 10:57 am

eoriou wrote:It would be very great, if we could define the output directory (-war option in GWT) in GWT Designer preferences (like Cypal Studio does). What do you think about that ?

Done. The tool should also now automatically recognize "war" and "WebContent" folders.

Image
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: GWT Designer's web project capabilities

Postby eoriou » Fri Jun 05, 2009 7:36 am

Hi,
That sounds great. But I have some comments about this new feature. During my test, I followed these three steps :
1. I created a new Dynamic Web Project (J2EE 5 compliant),
2. Then I converted it into a GWT Project,
3. And finally I created a GWT module.
I noticed three things :
1. web.xml file (found in WEB-INF directory) was overwritten by a new file compliant with J2EE 1.3. Is it possible to keep web.xml file when it already exists ?
2. GWT Designer did'nt copy gwt-servlet.jar file to WebContent\WEB-INF\lib directory,
3. GWT Designer put static resources (like HTML file, images and style sheet) directly to WebContent root directory. I think it should be better to put all these files into WebContent/<GWT Module Name> (like others files which will be generated by GWT compiler).

What do you think about these comments ?
eoriou
 
Posts: 19
Joined: Thu May 07, 2009 7:43 am

Re: GWT Designer's web project capabilities

Postby Eric Clayberg » Thu Jun 11, 2009 5:08 pm

eoriou wrote:1. web.xml file (found in WEB-INF directory) was overwritten by a new file compliant with J2EE 1.3. Is it possible to keep web.xml file when it already exists ?
2. GWT Designer did'nt copy gwt-servlet.jar file to WebContent\WEB-INF\lib directory,
3. GWT Designer put static resources (like HTML file, images and style sheet) directly to WebContent root directory. I think it should be better to put all these files into WebContent/<GWT Module Name> (like others files which will be generated by GWT compiler).

Give all of these issues a try using the very latest GWT Designer v7.0 build.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: GWT Designer's web project capabilities

Postby bernie » Sat Jun 13, 2009 5:33 am

Hi Eric,

The placement of the HTML under the com... directory has created 2 ... snags:

1- The application does not run unless you change the location of the html in the Run Configurations

pr1.png
Related to snag #1
pr1.png (108.42 KiB) Viewed 1660 times


2- Even if 1 is done, the application will not run unles the relative path to the javascript cache module in the html is also
changed

pr2.png
Related to snag #2
pr2.png (15.85 KiB) Viewed 1661 times


Regards,

Bernard
bernie
 
Posts: 1
Joined: Sat Jun 13, 2009 5:16 am

Re: GWT Designer's web project capabilities

Postby Eric Clayberg » Sun Jun 14, 2009 9:14 am

bernie wrote:1- The application does not run unless you change the location of the html in the Run Configurations
2- Even if 1 is done, the application will not run unles the relative path to the javascript cache module in the html is also
changed

Give both of these issues a try using the very latest GWT Designer v7.0 build.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: GWT Designer's web project capabilities

Postby eoriou » Thu Jul 16, 2009 3:56 am

Hi,
I have one another comment about this feature. During my test (with latest version of GWT Designer), I followed these four steps :
1. I created a new Dynamic Web Project (J2EE 5 compliant),
2. Then I converted it into a GWT Project,
3. Then I created a GWT module.
4. And finally, I created a remote service
I noticed this issue :
GWT Designer generated Java Classes (synchronous and asynchronous interfaces and implementation class) and updated WEB-INF\web.xml. Unfortunately, GWT designer did'nt update GWT Module file descriptor with this kind of tag <servlet path="/HelloService" class="com.renault.gwt.server.HelloServiceImpl"/>.

What do you thing about this issue ?
eoriou
 
Posts: 19
Joined: Thu May 07, 2009 7:43 am

Re: GWT Designer's web project capabilities

Postby Eric Clayberg » Thu Jul 16, 2009 11:06 am

AFAIK, remote services descriptions in *.gwt.xml are not required for GWT 1.6; just adding them into web.xml is enough.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: GWT Designer's web project capabilities

Postby eoriou » Mon Jul 20, 2009 6:50 am

Hi,
You're right. Sorry.
eoriou
 
Posts: 19
Joined: Thu May 07, 2009 7:43 am

Next

Return to GWT Designer

Who is online

Users browsing this forum: No registered users and 2 guests