URL rewriting

URL rewriting (or URL encoding) is a useful mechanism that does not require users to enable cookies in their browsers, and yet still allows WebSphere to manage sessions.

The process of setting up URL rewriting is not transparent to the Web application. It requires a developer to include specific commands to append the session information to the end of any HTTP link that will be used from the Web browser. The plug-in will search for any URL encoded session information about incoming requests and route them accordingly.

Rewriting the URLs can only be done on dynamic HTML that is generated within WebSphere, for example the output from JSPs or servlets. Session information will be lost if static HTML links are accessed, restricting the flow of site pages to dynamic pages only. From the first page, the user receives a session ID, and the Web site must continue using dynamic pages until the completion of the session.

There are no specific issues with using URL encoding in a workload-managed environment.

 

When to use URL encoding

Due to the restrictions mentioned above, the only situation in which URL encoding excels over the other options is when users have not enabled cookies in their browsers.

Because it is possible to select more than one mechanism to pass session IDs, it is also possible to compensate for users not using cookies. URL encoding could be enabled and then used as a fallback mechanism if the users are not accepting cookies.

  Prev | Home | Next

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.