Hi!

It's been suggested to not continue using the Struts own tag libraries and
instead move on to the JSTL. With them, I'd construct the following for
your scenario:

<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %>

<c:choose>
      <c:when test="${exception1}">
            your content
      </c:when>
      <c:when test="${exception2}">
            your content
      </c:when>
</c:choose>

You can nest the c:when and c:choose, so AND and OR constructs are
possible.

With regards
Karsten Krieg
intarsys consulting GmbH
----------------------------------------
Fon +49 (0)721 3 84 79 - 28
Fax +49 (0)721 3 84 79 - 60
e-mail [EMAIL PROTECTED]
http://www.intarsys.de
----------------------------------------

"Ashutosh Satyam" <[EMAIL PROTECTED]> schrieb am 23.02.2005 11:19:48:

> Hi,
>  Can you suggest how to use the logic tag library to achieve the
> following scenario.
>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>
>  In my Action class I expect few Exceptions to be thrown. Incase if
> any exception
>  is throw it's always redirected to a common 'error.jsp' page.
>
>  In this page I wanted to use 'logic' taglibrary to present a
> different content in the
>  page based on the Exception thrown.
>
>  Something like -
>   if( Exception1) {
>     some html contents
> } else if(Exception2) {
>     some html contents
> } else {
>    some html contents
> }
>
> Also how do we achieve logical AND and logical OR condtion using
> logic tag library
>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>
>  I hope we can use the logic taglibrary in the scenario what I
> pointed out. An example
>  for the same would suffice my requirement.
>
> Regards,
> Ashutosh
>
>




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

Reply via email to