Java Reference
In-Depth Information
It's crucial that you edit your web.xml file with the contents shown in Listing 9-8. Google Wave
sends HTTP POST requests to /_wave/jsonrpc each time an event occurs in a wave. Without
that mapping your robot won't respond to any requests.
1. Create two servlets in the src/com.kyleroche.wave directory.
Wave_ApressProfile.java
Wave_ApressServlet.java
2. Create a subdirectory under /war called _wave. Create two files in that directory.
capabilities.xml
profile.xml
3. Copy the code from Listing 9-4 to Wave_ApressProfile.java.
4. Copy the code from Listing 9-5 to Wave_ApressServlet.java.
5. Copy the code from Listing 9-6 to capabilities.xml.
6. Copy the code from Listing 9-7 to profile.xml.
7. Copy the code from Listing 9-8 to your existing web.xml file.
8. Deploy your application to App Engine.
After you've completed these steps you'll be able to interact with your robot in a wave.
Listing 9-4. Wave_ApressProfile.java
package com.kyleroche.wave;
import com.google.wave.api.ProfileServlet;
public class Wave_ApressProfile extends ProfileServlet{
@Override
public String getRobotName() {
return "Apress Wave";
}
}
Listing 9-5. Wave_ApressServlet.java
package com.kyleroche.wave;
import java.util.regex.Pattern;
 
Search WWH ::




Custom Search