Thanks Ben for your post.

However, I've travel a lot since i asked you the question and I figured
out that the suitable approach
is to keep the beans out of the http protocol (etc) and design the
system in such a way that the beans only concentrate on business logic.

I found this at http://www.esperanto.org.nz/jsp/jspfaq.html#q11

With this approach, the servlet is the entry point of a process, it
instantiate a beanObj that does something usefull, the servlet then
putValue(beanName, beanObj) in the session, request or application
context and then the servlet forward the processing to a JSP file which
inturn query the appropriate context to retreive the beanObj.

This way there is no need for the bean to know about the fact it is used
on the web and thus can be  more generic therefore a lot more reusable.

Regards,
--
Sylvain.


> Ben Dudley wrote:
>
> Yes it is possible - the example code given in Websphere (below)
> writes HTML out to the request object from the DataBean.
>
> Hope this helps,
>
> Ben Dudley
>
>
> ===================================================
> Sylvian asked:
>
> Hi,
>
> You seems to be doing interesting stuff with JSP, I would like to ask
> you one question.  Is it me or it is impossible for a bean to have
> access to the sessions, the request, the response, etc... objects?
>
> Regards,
> Sylvain.
>
> =====================================================
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to