After DAYS of searching and playing around I finally got it working! I
know a lot of people are having problems with this so I thought I
would give back.
Some good info to know:
- GWT V1.4
- Eclipse Version: 6.0.1 GA Build id: 6.0.1-GA-200710
- MySQL 5.1.5
Step #1:
Compile your code using the [App]-compile.cmd file that comes with
GWT. This should create a folder called "www".
Step #2:
Create a new folding in your root directory (where the bin, tomcat,
src, etc is located) and call it whatever (I called my "dist").
Step #3:
In that new folder you created copy all of the contents INSIDE of the
"www" folder (so don't select the "www" folder) into this new "dist"
folder. Make sure the files you select are all the files
like .cache.html, etc.
Step #4:
In the "dist" folder create a new folder called "WEB-INF". Inside this
"WEB-INF" folder create 2 new folders called "classes" and "lib".
Step #5:
In the "WEB-INF" folder create a "web.xml" file. E.g.
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<!-- Standard Action Servlet Configuration (with debugging) -->
<servlet>
<servlet-name>IComponentManagement</servlet-name>
<servlet-class>com.NRC_DND.server.IComponentManagementImpl</
servlet-class>
<load-on-startup>2</load-on-startup>
</servlet>
<!-- Standard Action Servlet Mapping -->
<servlet-mapping>
<servlet-name>IComponentManagement</servlet-name>
<url-pattern>/IComponentManagement</url-pattern>
</servlet-mapping>
</web-app>
Step #6:
Copy everything from the "bin" folder in the root directory to the "/
WEB-INF/classes" folder. Make sure you INCLUDE all of the folders in
the "bin" folder.
Step #7:
Copy the gwt-servlet.jar from the "gwt-windows-1.4.60" folder (this is
were GWT is installed) to the "/WEB-INF/lib" folder.
Step #8:
Copy the MySQL .jar file to the "/WEB-INF/lib" folder. In my case the
file was called "mysql-connector-java-5.1.5-bin.jar"
Step #9:
Zip up the contents of the "dist" folder, NOT including the folder. I
called mine "www.zip"
Step #10:
Rename "www.zip" to "www.war"
Step #11:
Deploy this to the Tomcat server by putting it into the "/webapps"
folder. If you have default configuration settings it should
automatically unzip the .war file.
Step #12:
TRY IT!
Hope this help everyone!