I don't understand everything in your email, but I think it's not so bad
as it looks.
It's true, the beans have limited way to do redirect - but there are other
ways to solve the problem, and redirect is not such a good ideea - maybe a
workaround ( for example because requires an extra round-trip). Coding
the logic of your application with redirects may be dangerous.
To resolve your problem, you can code all the logic you want - after the
initialization is done. For example you can use an includeif to display
the page only if the login bean has a certain state, or the login page
otherwise.
Or you can use RequestDispatcher ( losing some 2.0 compatibility ).
Or you can throw an exception in the init if login is bad - the errror
page will catch up and display the login screen.
Of course, it would be nice to have 2 methods called - one to init the
bean from request and a second called with both Request and Response
objects, called just before getting the stream. ( and a third - called
before to set the Context, so log can work). But that doesn't change it
too much -you might get a chance to set some headers or send a redirect
from the beans.
> unauthenticated sessions and fail. My first major point is that **there is
> no feasible way to integrate JSP components from two Model 2 applications
> which substantially and unnecessarily limits the reusability of Model 2
> components.**
A dispatcher is usefull in some situations, but can be avoided.
In the login case a simple erro handler would solve the problem ( or an
includeif).
> My second and last major point is this: **if a component inside page1.jsp
> can't intelligently redirect/dispatch then I am unnecessarily limited in the
> types of JSP components I can create.** An added problem is that the
> component can't log error messages either.
That's real. What I did - after I init the bean I call a method
init(ServletContext) - I can't log while in processRequest(), but anything
after can access the logs.
You can dispatch from inside a jsp page - and you can do a limited
internal redirect ( RD.forward() will not work, but there are workarounds)
> I'll add that the only .92 implementation of JSP is LiveSoftware's and when
> a component throws an exception the component simply returns a "null" String
> and does not invoke the error directive and error.jsp.
It seems like a bug.
Try using the if() - the overhead is not so big.
( I use a declarations.incl that contains the bean declarations and some
code to init the log and do some checks, and all my jsp pages includes it,
this way I can keep them clean)
Costin
===========================================================================
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".