Rich
That's becaue the & is used to separate name value pairs in the query string. so when you ask for the parameter 'refurl' it thinks the end of that parameter is at the &.
If 'threadid' is always the next parameter name then you can just use:
String
thread = request.getParameter("threadid");
to get the value of that parameter.
If it is different all the time you can use the getQueryString( ) method of the HttpServletRequest object and then parse it yourself.
hope that helps