Hi Everyone,

After hours of tests and trials, finally I have successfully migrated
my RPC-based GWT application from the hosted mode to an external
Tomcat server. The IDE used is Eclipse. Here is what worked for me.

1. Make sure the application runs correctly on the hosted mode.
1. Compile the application, using GWT compiler.
2. Create a jar file of the source code as mentioned here:
http://blog.elitecoderz.net/gwt-and-tomcat-create-war-using-eclipse-to-deploy-war-on-tomcat/2009/12/
3. Create the file build.xml inside the Project folder. Following is
the code I use in my project (called ScatterGatherSearch).
<project name="ScatterGatherSearch" basedir="." default="default">

        <target name="default" depends="buildwar,deploy"></target>

        <target name="buildwar">
                <war basedir="war" destfile="
ScatterGatherSearch.war" webxml="war/WEB-INF/web.xml">
                        <exclude name="WEB-INF/**" />
                        <webinf dir="war/WEB-INF/">
                                <include name="**/*.jar" />
                        </webinf>
                </war>
        </target>

        <target name="deploy">
                <copy file=" ScatterGatherSearch.war" todir="."/>
                <echo>http://localhost:8080/ScatterGatherSearch/
ScatterGatherSearch.html</echo>
        </target>

</project>
4. Install Apache Ant on your machine.
5. Right click on the build.xml and click on: Run As >Ant Build. This
would create a war file with .war extension under the project folder.
6. Copy the war file into the webapps folder of the tomcat
installation.(Assuming Tomcat has been successfully installed on your
local machine)
7. After the tomcat service starts, the war file would automatically
be expanded to a folder with the same name.
8. Open the browser 
http://localhost:8080/ScatterGatherSearch/ScatterGatherSearch.html
- and your application should work just fine.


Thanks,
Ritu

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

Reply via email to