Hey Anand,

It's not as simple as this. JSTL can simply not accomplish this. There are a few 
solutions:

Solution 1:
1. Make a servlet or filter.
2. In this code create a new HttpServletRequestWrapper that overrides getParameter() 
and returns Default for the keys you wish to catch.
3. Forward to the next page.

Solution 2:
1. Do as you did in your example.
2. Do not use ${param[]} or ${paramValues}, but instead use ${vendor} and ${station}

I'd personally go with solution 1 since it's a little more robust, but I think you 
might be best off using solution 2 since it is JSTL only and rather simple.

Martin

> -----Original Message-----
> From: Narayan, Anand [mailto:[EMAIL PROTECTED]
> Sent: vrijdag 10 oktober 2003 19:09
> To: 'Tag Libraries Users List'
> Subject: Clear request parameters
> 
> 
> I was trying to clear request parameters 
> that were submitted to a form before processing
> further.  
> 
> I have the following code to try to clear the 2 parameters
> param.vendor and param.station.  
> <c:if test="{param.submit eq 'Reset'}">
>       <c:set var="vendor" scope="request" value="Default"/>
>       <c:set var="station" scope="request" value="Default"/>
> </c:if>
> 
> This is not working. Anybody know how i can do this.
> 
> Thanks
> Anand Narayan
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to