Packaging a GWT project in a Web Project WAR

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

Packaging a GWT project in a Web Project WAR

Postby bdemchak » Tue Aug 12, 2008 10:00 am

Hi ...

... I have followed the advice in the "GWT Projects vs Web Projects w/ GWT" thread, but with mixed results. I'm sure there is plenty I don't understand. If you could help me out ...

I *was* able to get a working deployment to a Tomcat server. I have two projects: the web project (PALMS_Test_Web) and the GWT Java project (PALMS_Browser). The web project contains a servlet (TestCaseUploadServlet). The GWT Java project contains a service (MyService) and a small web page.

When I use the web project Deployment command, I *do* get a WAR and it seems to be complete. However, it compiles the GWT project into a subdirectory puts the web page in a subdirectory apparently named with the full package name for the GWT entrypoint (org.paceproject.palms.browser.PALMS_Browser). Then, to access the web page, I have to surf to:

http://localhost:8080/PALMS_Test_Web/or ... owser.html

I would have thought that the right URL should have been just http://localhost:8080/PALMS_Test_Web/PALMS_Browser.html

Additionally, the GWT full package name is prepended to my server definition in the generated WEB-INF/web.xml, meaning that when I try to execute it from within the web page, it cannot be found. (I can solve this by hand-editing WEB-INF/web.xml to get rid of the full package name in the servlet and servlet-mapping sections.)

Question 1: Is there something I should be setting so that the GWT entrypoint is accessible through a URL that doesn't include its full package name?? ... and so that the WEB-INF/web.xml servlet/servlet-mapping sections are generated correctly??

Also, the web project (PALMS_Test_Web) depends on a third project, PALMS_Server. When the .WAR file is generated, the libraries contributed by the PALMS_Server project are not picked up and inserted into the .WAR file automatically. To get this to happen, I have to add them to the Referenced Libraries section of the web project.

Question 2: Should the web project Deployment automatically pick up the Referenced Libraries (and external JARs) from the Required Projects??

Thanks! I have attached all three projects in a ZIP ... they're small, as I'm currently doing feasibility analysis exercises on GWT Designer.
Attachments
PALMS.zip
(115.28 KiB) Downloaded 143 times
bdemchak
 
Posts: 2
Joined: Mon Aug 11, 2008 3:02 pm

Re: Packaging a GWT project in a Web Project WAR

Postby Konstantin.Scheglov » Tue Aug 12, 2008 7:39 pm

bdemchak wrote:Question 1: Is there something I should be setting so that the GWT entrypoint is accessible through a URL that doesn't include its full package name?? ... and so that the WEB-INF/web.xml servlet/servlet-mapping sections are generated correctly??


No, 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.


bdemchak wrote:Also, the web project (PALMS_Test_Web) depends on a third project, PALMS_Server. When the .WAR file is generated, the libraries contributed by the PALMS_Server project are not picked up and inserted into the .WAR file automatically. To get this to happen, I have to add them to the Referenced Libraries section of the web project.

Question 2: Should the web project Deployment automatically pick up the Referenced Libraries (and external JARs) from the Required Projects??


Yes.
This is bug in Web project deployment (and we include required projects during simple GWT module deployment), we are going to fix it soon.
Konstantin.Scheglov
Moderator
 
Posts: 186
Joined: Tue Oct 18, 2005 8:11 pm
Location: Russian Federation, Lipetsk

Re: Packaging a GWT project in a Web Project WAR

Postby Konstantin.Scheglov » Fri Aug 15, 2008 11:11 pm

Konstantin.Scheglov wrote:
bdemchak wrote:Question 1: Is there something I should be setting so that the GWT entrypoint is accessible through a URL that doesn't include its full package name?? ... and so that the WEB-INF/web.xml servlet/servlet-mapping sections are generated correctly??

No, 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.

Done.

Konstantin.Scheglov wrote:
bdemchak wrote:Also, the web project (PALMS_Test_Web) depends on a third project, PALMS_Server. When the .WAR file is generated, the libraries contributed by the PALMS_Server project are not picked up and inserted into the .WAR file automatically. To get this to happen, I have to add them to the Referenced Libraries section of the web project.

Question 2: Should the web project Deployment automatically pick up the Referenced Libraries (and external JARs) from the Required Projects??

Yes.
This is bug in Web project deployment (and we include required projects during simple GWT module deployment), we are going to fix it soon.

Fixed.
Konstantin.Scheglov
Moderator
 
Posts: 186
Joined: Tue Oct 18, 2005 8:11 pm
Location: Russian Federation, Lipetsk


Return to GWT Designer

Who is online

Users browsing this forum: No registered users and 3 guests