Actually, you cannot do this. Since you are using JHTML, the only way to get the value of the request parameter is through JavaScript, and since JavaScript code won't be executed until the page gets to the client, it will be too late for the <SERVLET> tag process it. All <SERVLET> tags must be static, unless the server you are using provides a mechanism for making them dynamic.