Package net.rim.pushsdk.subscription.web

This package contains web-related subscription classes including the subscription servlets.

See:
          Description

Class Summary
BaseRequest Base class that represents the details of an HTTP request from a subscription operation.
ResumeRequest Represents the details of an HTTP request from a resume subscription.
ResumeServlet Servlet responsible for handling a resume subscription operation.
SubscribeRequest Represents the details of an HTTP request from a subscribe.
SubscribeServlet Servlet responsible for handling a subscribe operation.
SubscriptionRequestParser Parses the needed parameters out of various subscription-related HTTP requests.
SubscriptionServlet Subscription servlet base class with abstract methods that must be implemented to perform a subscription operation.
SuspendRequest Represents the details of an HTTP request from a suspend subscription.
SuspendServlet Servlet responsible for handling a suspend subscription operation.
UnsubscribeRequest Represents the details of an unsubscribe request.
UnsubscribeServlet Servlet responsible for handling an unsubscribe operation.
 

Enum Summary
SubscriptionStatusCode Status codes returned by the subscription servlets (subscribe, unsubscribe, suspend, resume).
 

Package net.rim.pushsdk.subscription.web Description

This package contains web-related subscription classes including the subscription servlets.

Character encoding of HTTP request parameters:

It is, highly recommended that any type of subscription request set an HTTP header for Content-Type with a character set specified:
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

The charset can be set to whatever encoding is desired (UTF-8 is recommended though). It is the responsibility of requests coming from the device to correctly encode the request parameters in that character set.

If no Content-Type header is provided on a request, then the push SDK will use the default character encoding of the application server (e.g. tomcat) the subscription servlets are running on.

Note: To set a default character encoding for Apache Tomcat, you would modify catalina.bat to have -Dfile.encoding="UTF-8" on the JAVA_OPTS line.
For Apache Tomcat, you can also modify server.xml (under the conf directory of your Tomcat installation) to handle HTTP GET requests using the correct character encoding for the request parameters. Update the line:
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" URIEncoding="UTF-8" />
to have the encoding of the request parameters treated as UTF-8.
(OR
To avoid hardcoding the UTF-8 character set directly, you can instead tell Tomcat to use the character encoding of the HTTP request. Update the line:
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" useBodyEncodingForURI="true" />
)



Copyright © 2011 Research In Motion. All Rights Reserved.