pass and ampersand
response.sendRedirect("showAddAMember?cntry=" + country +"&stte=" + state +"&city=" + city +"&course=" + course +"&coursename=" + coursename +"&messagename=" + messagename +"&TFM=" + worker +"&admin_type=" + admin_type);
I am using a response.sendredirect() to pass parameters from one servlet to another. Above is one such case I am using in my program. The problem I am having is that I have an ampersand (&) as part of a variable string I am passing. When the next servlet is called and the variables are passed, the '&' is reached in the content of the string and is recognized as the start of the next variable to be passed. Hence, any remaining part of the string is chopped off or severed right before the ampersand.
For example,
"...&messagename=The Raven G&CC&TFM=green&admin_type=4");
only 'The Raven G' gets passed instead of the entire string that I want passed, which is 'The Raven G&CC'.
What can I do to pass a string with an ampersand within it without it getting severed? As you can see the variable string content is variable, so it must not work just for a one time pass but be adaptable depending on the content of the current variable string.
There must be a java object that takes care of this problem or you could never pass a variable string with an ampersand in its content.
If anyone knows of the generally accepted method for solving this problem that would be of great help to myself. My program depends on it and can not operate without it.
Thank-You for your help.
Derek Z.

