You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Atle Prange <at...@businesscape.no> on 2008/08/14 15:09:07 UTC

Page Loading and OSGI

Hi,

i am currrently trying to integrate tapestry into an OSGI container 
using apache felix and the ops4j pax web service. (For many interesting 
reasons, one of them is the possibility to add services to the webapp at 
runtime...)

I have managed to register the Tapestry filter, and load my app module, 
the builtin modules are also loaded at startup.
But i am not able to load my pages, the request just falls through and 
ends up with my registered default servlet.
I have tried to locate the code that bootstraps the pages and components 
to see if there is some error in locating or loading the page classes in 
the .pages package, but i have not been able to find the code that 
initializes the pages.

Could someone with intimate knowledge of tapestry give me a hint to 
where the loading of pages is performed initially, so i can check for 
myself?



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Page Loading and OSGI

Posted by Atle Prange <at...@businesscape.no>.
Igor Drobiazko wrote:
> As described in TAPESTRY-2519 you need to override the service
> ClasspathURLConverter. Something like that:
>
> public class MyClasspathURLConverterImpl implements ClasspathURLConverter
> {
>     public URL convert(URL url)
>     {
>         if (url.getProtocol().startsWith("bundle"))
>          {
>                //return a valid java url here
>          }
>         return url;
>     }
> }
>
> This will let you load the page classes within OSGi container.
>
> To contribute OSGi Services to Tapestry, you have to wrap them by
> org.apache.tapestry5.ioc.def.ServiceDef. Please see how tapestry-spring
> module does it.
>
> There are still further challenges, but I guess you want be able to start a
> hello world page first. :)
>
> On Thu, Aug 14, 2008 at 3:09 PM, Atle Prange <at...@businesscape.no>wrote:
>
>   
>> Hi,
>>
>> i am currrently trying to integrate tapestry into an OSGI container using
>> apache felix and the ops4j pax web service. (For many interesting reasons,
>> one of them is the possibility to add services to the webapp at runtime...)
>>
>> I have managed to register the Tapestry filter, and load my app module, the
>> builtin modules are also loaded at startup.
>> But i am not able to load my pages, the request just falls through and ends
>> up with my registered default servlet.
>> I have tried to locate the code that bootstraps the pages and components to
>> see if there is some error in locating or loading the page classes in the
>> .pages package, but i have not been able to find the code that initializes
>> the pages.
>>
>> Could someone with intimate knowledge of tapestry give me a hint to where
>> the loading of pages is performed initially, so i can check for myself?
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>     
>
>
>   

Excellent and thank you for the reply, now i have a starting point, and 
a clue to continue the integration.

-atle

Re: Page Loading and OSGI

Posted by Igor Drobiazko <ig...@gmail.com>.
As described in TAPESTRY-2519 you need to override the service
ClasspathURLConverter. Something like that:

public class MyClasspathURLConverterImpl implements ClasspathURLConverter
{
    public URL convert(URL url)
    {
        if (url.getProtocol().startsWith("bundle"))
         {
               //return a valid java url here
         }
        return url;
    }
}

This will let you load the page classes within OSGi container.

To contribute OSGi Services to Tapestry, you have to wrap them by
org.apache.tapestry5.ioc.def.ServiceDef. Please see how tapestry-spring
module does it.

There are still further challenges, but I guess you want be able to start a
hello world page first. :)

On Thu, Aug 14, 2008 at 3:09 PM, Atle Prange <at...@businesscape.no>wrote:

> Hi,
>
> i am currrently trying to integrate tapestry into an OSGI container using
> apache felix and the ops4j pax web service. (For many interesting reasons,
> one of them is the possibility to add services to the webapp at runtime...)
>
> I have managed to register the Tapestry filter, and load my app module, the
> builtin modules are also loaded at startup.
> But i am not able to load my pages, the request just falls through and ends
> up with my registered default servlet.
> I have tried to locate the code that bootstraps the pages and components to
> see if there is some error in locating or loading the page classes in the
> .pages package, but i have not been able to find the code that initializes
> the pages.
>
> Could someone with intimate knowledge of tapestry give me a hint to where
> the loading of pages is performed initially, so i can check for myself?
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Best regards,

Igor Drobiazko

Re: Page Loading and OSGI

Posted by "Filip S. Adamsen" <fs...@fsadev.com>.
Hi,

I have no experience with OSGi, but perhaps this issue can help:
https://issues.apache.org/jira/browse/TAPESTRY-2519

-Filip

On 2008-08-14 15:09, Atle Prange wrote:
> Hi,
> 
> i am currrently trying to integrate tapestry into an OSGI container 
> using apache felix and the ops4j pax web service. (For many interesting 
> reasons, one of them is the possibility to add services to the webapp at 
> runtime...)
> 
> I have managed to register the Tapestry filter, and load my app module, 
> the builtin modules are also loaded at startup.
> But i am not able to load my pages, the request just falls through and 
> ends up with my registered default servlet.
> I have tried to locate the code that bootstraps the pages and components 
> to see if there is some error in locating or loading the page classes in 
> the .pages package, but i have not been able to find the code that 
> initializes the pages.
> 
> Could someone with intimate knowledge of tapestry give me a hint to 
> where the loading of pages is performed initially, so i can check for 
> myself?
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org