"Sun Lihua (NWSS/Sydney)" wrote:
>
> Hi,
>
> I've played with JSP spec 1.0 for a while, with Sun's implementation, and
> I've several questions:
>
> 1.
> (1) according to the specification, there should be a class named
> javax.servlet.jsp.PageContext class, but I could not find it.
> (2) I've created a jsp file with a bean's scope as "page", but the java file
> could not be generated for this jsp file, I'm not sure whether it's because
> of missing PageContext class.

        The current version of the RI does not include this (see the release
notes)
        the next release will ...
>
> In Sun's examples, I could find scope="request/session/application", but
> could not find scope="page".
>
> 2. what's the real difference between "page" bean and "request" bean? does
> the difference exist only if a "request" consists several Jsp files?

        The only real difference is that a "page" scoped bean is stored in the
        PageContext and if no other references are held to it, it will be
        eligble for garbage collection upon return from _jspService(), a
"request"
        scoped bean on the other hand is stored in the HttpServletRequest and
therefore
        would be available to other JSPs/Servlets processing the same request,
i.e if
        your forward or include one into your page.
>
> 3. I'm really confused by the two including methods:
>         <%@ include... %> and <jsp:include file=... />
> because both of them could include .html or .jsp files, from the result
> point of view, I could not see the reason to distinguish them.
>

        You need to re-read the spec on this. the <%@ include ... %> directive
        occurs when the JSP page is logically translated into the
implementation
        class (therefore notionally once), the <jsp:include ... /> action
occurs
        at request processing time. So, tha main differences are:

        1) the translation time directive can include jsp "code" and/or static
           contents that will be translated into the implementation class.

        2) the request time action can include static content (that may be
updated
           between requests to the server) that will be included into the
output
           stream returned in the response to the requesting client.

> 4. removing the LOOP tag, IMO, is not a good approach, because it means we
> must depend completely on scriptlet to display the indexed or nested
> property, which I think is contratory to the initial idea to seperate
> presentation from business logic (java code). Anyway we've seen the war
> between the two camps already.

        It was a tough decision to remove this functionality but we think we
        have *mostly* done the right thing ... the custom tag mechanism in 1.1
        will provide a very flexible system that will make such std tags less
        important.

>
> Thanks in advance.
>
> Lihua Sun


        Rgds

        - Larry Cable.
begin:vcard
n:Cable;Laurence
x-mozilla-html:TRUE
        (MS: UCUP02-201), 901 San Antonio Road,;Palo Alto;CA;94303;USA
org:Java Software
version:2.1
email;internet:[EMAIL PROTECTED]
title:Senior Staff Engineer
tel;fax:408-863-3195
tel;work:408-343-1776
adr;quoted-printable:;;Sun Microsystems Inc.,=0D=0A=
x-mozilla-cpt:;0
fn:Laurence  Cable
end:vcard

Reply via email to