I'm considering moving a large codebase of proprietary templates 
to jsp, and the jstl in particular.  A problem I've had so far 
is with using SPEL and if tag.  Such as:
  <c:if test="$param:myParam == '1'">do stuff</c:if>
and myParam does not exist in the url query string, an exception 
is thrown.  We have many parameters that aren't required which
initialize to default values, but we want an easy way to test 
against their existence in jsp.  The request tag library has 
some nice ways of doing this, but I like the idea of using one 
set of tag libraries, not a mish-mash of many incompatible ones.  
I just don't think tags like this should throw exceptions on 
non-unrecoverable errors.  Instead, it should just return an 
empty string (or some reasonable equivalent).

a way around this would be to use Ecmascript to hold a reference
to some object, which we use get/set methods on, for example:
<% request.setAttribute("req",request); %>
but we're having a hard time passing values to this object
<c:if test="$req.getParameterName("myParam")">...</c:if>

but the syntax doesn't seem to work - is there a way around this?


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

Reply via email to