Project

General

Profile

1 3192 berkley
Author: Chad Berkley
2
Date: 3/5/2007
3
4 3195 berkley
This file covers deploying the gwt created ajax code and servlet to a non-google
5
version of tomcat.  This allows for the installation of the servlet(s) along
6
side a normal metacat installation.  This file assumes you've already done
7
the steps highlighted in the README file.
8 3192 berkley
9 3195 berkley
1) Create a servlet on your tomcat instance called "rpc".  This is a simple
10
servlet that just runs the google remote procedure call (rpc) services.  Use
11
the web.xml file from the ./tomcat/webapps/ROOT/WEB-INF directory.  You'll
12
also need to copy all of the gwt jar files from your gwt installation as well
13
as all of the jar files in ./lib.  Use the gwt-user.jar and gwt-dev.jar from
14
metacat/lib.  If you use the ones from the gwt distro, tomcat won't load them
15
due to the presence of javax.servlet.Servlet.
16 3192 berkley
17 3195 berkley
2) copy ./src/org/kepler/web/service/KeplerServiceServlet.java to
18
metacat/src/org/kepler/web/service/ and update the KeplerServiceServlet.java
19
Edit the file with the correct url to your metacat servlet (line 6 in the code).
20
Make sure the moduleRelativeURL exactly matches the url that will be browsed
21
to!  I.E. Don't use "localhost" if you intend to browse to an actual machine
22 3207 berkley
name.  This confuses the RPC and will cause problems.
23 3192 berkley
24 3207 berkley
3) Copy the lib/gwt-*.jar files to metacat/lib.  Note this may cause some
25
problems with jsp compilation.
26
27
4) run 'ant package' (from the ajax dir) and copy the newly created
28 3195 berkley
kepler-web.jar file to metacat/lib/.  Make sure you updated the hard coded
29
servlet paths in the java code before doing this.
30 3192 berkley
31 3207 berkley
5) run 'ant install' from your metacat directory
32 3192 berkley
33 3207 berkley
6) make sure tomcat restarts
34 3192 berkley
35 3207 berkley
7) run ./KeplerClient-compile and copy the contents of the www directory
36 3195 berkley
to some web accessible location, then browse to the KeplerClient.html file
37
and the javascript should run.
38 3192 berkley
39
--------------------------------
40 3195 berkley
If this doesn't work for some reason, keep in mind the main things you need.
41
They are:
42 3192 berkley
* the rpc servlet
43 3195 berkley
* the KeplerServiceServlet servlet.  In the web.xml file, I have called this
44
  'gwt' so the address will be: http://server:8080/servletpath/gwt
45
* the compiled javascript (ajax) code
46 3192 berkley
* hard coded server/servlet paths correctly changed
47
* all jar files accessible to tomcat