I think Junilu Lacar is on the right track with his answer. You want to include a
'value' attribute in your OPTION elements. The contents of the value attribute will
be sent to your servlet (or JSP) when the page is submitted, even if the value contains
spaces.
Here is a technique I use to test these types of things (using IE)
First, save the file 'test.htm' as follows:
Now open it in IE (you don't need to open it through a web browser. Just use Windows
Explorer to navigate to the file, and double click on the file). Select the third element
from the drop-down list, then click 'Submit'. Now look at the address bar.
You should see
a URL that looks like this:
You can see that the routePrefix parameter does not have any leading spaces.
Now replace the file with the following HTML code
Do the same thing (click on the 3rd choice in the drop-down list, the click Submit, and look
at the URL that appears in the address bar). Now the URL looks like this
The '+' is how a space looks in a URL parameter. In
Java when you use .getParameter(), you
will see a space so .getParameter( "routePrefix") should retrieve " 29".