On Tuesday 30 July 2002 17:43, you wrote:
> On Tue, 30 Jul 2002, David Goodenough wrote:
> > Using JSTL can I set a param.? value?  I can access the values using:-
> >
> > <c:out value="${param.Name}" />
> >
> > but if I want to update the value using:-
> >
> > <c:set var="param.Name" value="new Value" />
> >
> > subsequent uses of "${param.Name}" seem to have the old value not the
> > new one.
> >
> > Do I need to specify a scope, or should I use the param[ 'Name'] notation
> > or what?
> >
> > Thanks in advance
>
> Per the Servlet specification, you cannot change parameter values.  There
> is no ServletRequest.setParameter() call; the values are intentionally
> immutable.  If you need mutable values, it's probably best to use regular
> scoped attributes (which you can seed with values from parameters).

OK, I will change my code accordingly.  Can I suggest that swallowing the
values silently is a bit unhelpful, perhaps it should throw some kind of 
exception if you try to set something that can not be set!

David

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

Reply via email to