On Thu, 14 Mar 2002, Matt Raible wrote:

> I'm trying to use JSTL do check for values of certain variables.  For instance,
> I want to find out if the "action" parameter (passed in via URL) is equal to
> "Edit."  However, my code below is not working:
> 
>            <c:if test="${request:action == 'Edit'}">
>            
>               I detected you where trying to edit me
>            
>            </c:if>
> 
> I get an error stating that:
> 
> "action" is not defined. 
> 
> Please send responses to [EMAIL PROTECTED] as I am not subscribed
> to this list.

Matt,

The JSTL expression language has changed.  You should now write

  ${param.action == 'Edit'}

Actually, 'request:action' would have never indicated a request
parameter; it would have indicated a request-scoped variable
("attribute").   Now, you'd use ${request.action} to indicate the 'action'
variable in 'request' scope.

--
Shawn Bayern
Author, "JSP Standard Tag Library"  http://www.jstlbook.com
(coming early this summer from Manning Publications)


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

Reply via email to