Hi Raymond
In pure servlets, you probably have two scenarios:
- If it got redirected from a jsp that already started the SCADomain,
you would have access to it, as it's application scope, right ? If the
attribute is null, you would have to perform a SCADomain.start. So, probably
something like this :
SCADomain domain = (SCADomain) application.getAttribute("SCADomain");
if (domain == null) {
domain = SCADomain.newInstance("http://calc", ".", "Calculator.composite");
}
In this case, using the servletContextListener gives a consistent
programming model to the developer...
But, in the case of calculator-web, it's a simple client web App without a
servlet.
On 5/7/07, Raymond Feng <[EMAIL PROTECTED]> wrote:
Hi,
I think the jsp:useBean only works with JSPs. How about pure servlet?
Thanks,
Raymond
----- Original Message -----
From: "Luciano Resende" <[EMAIL PROTECTED]>
To: "tuscany-dev" <[email protected]>
Sent: Monday, May 07, 2007 12:47 AM
Subject: Web Application integration story
> Recently we have been prototyping around what should be our web client
> application story, and I think our main goal should be simplicity, using
> approaches that are familiar to any web application developer.
>
> I have posted on our wiki [1] the description of three options that we
> have
> tried on calculator-web on the past couple days. Basically, I think
option
> 2
> and 3 gives very similar results, but the usage of the jsp:useBean tag
> make
> things simpler, and does not require to register and use a
contextListner.
> If we all agree, I'd like to propose using option 2, and would like to
> update calculator-web (that i have locally working with option2) to use
> this
> approach.
>
> Thoughts ? Should we demonstrate multiple options ? Otherwise, is it ok
if
> I
> make calculator-web using the proposed approach ?
>
> [1]
>
http://cwiki.apache.org/confluence/display/TUSCANY/Tuscany+SCA+Web+Application+Integration+Story
>
> --
> Luciano Resende
> http://people.apache.org/~lresende
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Luciano Resende
http://people.apache.org/~lresende