I’m trying to create a GWT app that has two modules:
WebModule– that contains all the code that will appear to be the “public website”; andAppModule– gets loaded only after the user signs in (via aLoginScreeninside theWebModule) for security and performance reasons
I’m unsure of how to package the WAR. With one module (that contains an Entry Point), the normal structure seems to be this:
src/
com.myapp
MyApp.gwt.xml
com.myapp.client
MyApp.java
war/
WEB-INF/
lib/
web.xml
MyApp.css
MyApp.html
But with 2+ modules, I’m confused as to where I can/should place the various files. I’d like to do something like this:
src/
com.myapp
WebModule.gwt.xml
AppModule.gwt.xml
com.myapp.client.modules
WebModule.java (implements EntryPoint)
AppModule.java (implements EntryPoint)
war/
WEB-INF/
lib/
web.xml
css/
web-module.css
app-module.css
html/
web-module.html
app-module.html
But I’m unsure if this is “legal” (GWT and Java EE standards) structure or not, and I’m also unsure as to how to link “MyApp” with the “WebModule” so that WebModule is the first module downloaded when the user goes to http://www.myapp.com.
This is the right structure. You don’t have to create separate folders for HTML and CSS, though, as you only have two files in each.
You specify which file loads first, when users visit your domain, in web.xml file: