You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Viatcheslav Kuravskiy <ku...@googlemail.com> on 2009/06/18 10:20:32 UTC

SCA and JSP/Servlet

I've deployed Tuscany project at Tomcat. With this code I can start 
SCA-runtime from jsp-page:


<%@ page import="org.apache.tuscany.sca.host.embedded.SCADomain"%>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
     SCADomain scaDomain = (SCADomain) 
application.getAttribute("org.apache.tuscany.sca.SCADomain");
	TestService service = 
(TestService)scaDomain.getService(TestService.class, "TestComponent");
%>


How can I use this service in other jsp-pages and servlets without 
repeating this code?
How SCA-runtime can be started automatically with Tomcat?


Viatcheslav.