I have solved my problem. The solution may be helpful to others with
similar requirements.
my solution:
1. Create a new and additional module, db_maint.gwt.xml:
<?xml version="1.0" encoding="UTF-8"?>
<module>
<inherits name="com.google.gwt.user.User"/>
<entry-point class="com.myApp.client.DB_MaintEntryPoint"/>
<stylesheet src="maintenancePage.css"/>
<stylesheet src="messagePanel.css"/>
</module>
2. Create a new EntryPoint class, DB_MaintEntryPoint.java:
/* DB_MaintEntryPoint.java
*
*/
package com.myApp.client;
import com.google.gwt.core.client.EntryPoint;
import com.myApp.client.gui.MainFrame;
public class DB_MaintEntryPoint implements EntryPoint {
/** Creates a new instance of MainEntryPoint */
public DB_MaintEntryPoint() {
}
/**
The entry point method, called automatically by loading a
module
that declares an implementing class as an entry-point
*/
public void onModuleLoad() {
new MainFrame();
}
} // End of DB_MaintEntryPoint
3. Create a new html to load the new module, db_maint.html:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD.HTML 4.0 Strict//EN" "http://
www.w3.org/TR/html40/Strict.dtd">
<HTML>
<HEAD>
<TITLE>MyApp Database maintenance</TITLE>
</HEAD>
<BODY>
<script language="javascript"
src="com.myApp.db_maint.nocache.js"></script>
</BODY>
</HTML>
4. My development environment is driven by ant, so I had to modify my
build.xml to include my new module in the compile process, both for
that process which does the GWT compile for deployment and,
separately, for the process that drives the hosted mode:
In my build.xml, GWTcompile target:
<!-- GWT compile db_maint module -->
<java classname="com.google.gwt.dev.GWTCompiler"
fork="true"
maxmemory="256m" >
<arg value="-out"/>
<arg value="web"/>
<arg value="com.myApp.${db_maint.module.name}" />
<classpath path="${project.class.path}" />
</java>
Then into the GWTshell target:
<!-- GWTShell compile db_maint module -->
<target name="gwtRAD_db_maint" depends="compile" description="Runs
the application under the GWT shell">
<java classname="com.google.gwt.dev.GWTShell"
fork="true"
spawn="true"
maxmemory="256m" >
<arg value="-out"/>
<arg value="web"/>
<arg value="com.myApp.${db_maint.module.name}/$
{db_maint.module.name}.html" />
<classpath path="${project.class.path}" />
</java>
<echo>
The GWT shell is starting database maintenance.
</echo>
</target>
Having accomplished these steps and then compiled and deploy to tomcat
I can run my main application by
http://localhost:8080/myApp
and my subApp by
http://localhost:8080/db_maint.html
Works for me! I hope this may to useful to others. Enjoy!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---