It's in here:

###########################################################
# Extracted from JavaServer Pages Specification Version 1.1
###########################################################

7.4.1 Declarations
    In the XML document corresponding to JSP pages,
    declarations are represented using the syntax:

        <jsp:declaration> declaration goes here </jsp:declaration>

    For example, the second example from Section 2.10.1:

        <%! public String f(int i) { if (i<3) return("..."); ... } %>

    is translated using a CDATA statement to avoid having
    to quote the "<" inside the jsp:declaration.

    <jsp:declaration> <![CDATA[ public String f(int i) { if (i<3)
    return("..."); } ]]> </jsp:declaration>

    DTD Fragment <!ELEMENT jsp:declaration (#PCDATA) >

===============

By the way, the jsp directive is like this : <%@ .... %>
but you are right, <%! ... %> is the jsp declaration tag.

My problem is using these jsp tag inside an XML document
will cause major headache because it makes the XML not
well-formed. Though it can be solved by using DTD parameter
entitis and some other tricks but the most elegant solution
is the <jsp:declaration> tag, in the spec.


----- Original Message ----- 
From: "Rafael Alvarez" <[EMAIL PROTECTED]>
To: "Orion-Interest" <[EMAIL PROTECTED]>
Sent: Friday, April 20, 2001 10:00 PM
Subject: Re: <jsp:declaration> parsing error


> Hello doggie,
> I can't find the <jsp:declaration> tag anywhere in the spec, but it
> sounds like the <%! %> directive.
> Try using:
> <%!
>      private static final String[] toStringArray(int[] ori_array){
>          String [] str_array = new String[ori_array.length];
>              for (int i = 0; i < ori_array.length; i++){
>                  str_array[i] = String.valueOf(ori_array[i]);
>              }
>          return str_array;
>      }
> %>
> 
> > It seems that orion ignored the jsp tag <jsp:declaration> completely.
> 
> -- 
> Best regards,
>  Rafael                            mailto:[EMAIL PROTECTED]
> 
> 
> 
> 


Reply via email to