John Langley wrote:
>
> and a 'use case' in the form of "guarded pages"
> a.k.a. required login.
>
> I noticed in the 1.0 preliminary spec. that the "processRequest
> machinery" is listed under the heading of "Postponed for Evaluation
> in Future Releases". I would like to voice a strong positive statement
> in favor of including the processRequest() machinery (as soon as
> possible). Here's why...
> [...]

The problem with processRequest in Beans is that by adding it, the Bean
is no longer a Bean, it's a "JSP Bean". This may be mostly academic, but
JSP 1.0 lays the groundwork for a much better alternative namely the
Tag Extension framework. The Tag Extension framework will let you define
your own tags that by definition are "active". You could for instance
develop a

  <mycomp:loginChecker userFieldloginURL="/login.jsp"/>

tag that does your login check, redirects to loginURL if the user
is not logged in and aborts the processing of the rest of the page.
If the user is logged in it lets the processing continue.

With "JSP Beans" and processRequest you can do all of this in one shot.
You have to use a property to check the result of the validation in
<excludeif>/<includeif> tags, or actually scriptlets now since these
tags do not exists in 1.0.

So besides being more powerful, the Tag Extension mechanism provides
a much nicer syntax than the generic <jsp:usebean> syntax and avoids
overloading the Bean concept with functionality that doesn't belong
there.

The only problem is that a portable API for Tag Extension implementations
will not come until JSP 1.1. Until then you can use the scriptlet
based solution suggested by others.

--
Hans Bergsten           [EMAIL PROTECTED]
Gefion Software         http://www.gefionsoftware.com

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to