You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Bruce Petro <bp...@artromick.com> on 2007/06/07 23:06:05 UTC

T5: web.xml - multiple applications?

I was thinking for development purposes it might be desirable to have
multiple contexts.

But I don't see how to tie a context-param (which determines which
classes handle the requests) to a filter definition (which specifies a
url pattern to handle)

I'm making a wild guess that in the sample "app" setup, perhaps it's the
app in the "tapestry.app-package" perhaps matches the app in the
filter-name.

Is that how they are paired up?  If so, then please confirm this is how
you would do this. If this isn't true - can someone specify how it's
done?

 

Thanks.

 

<!-- ============================================= -->

      <context-param>

           <!-- The only significant configuration for Tapestry 5, this
informs Tapestry

               of where to look for pages, components and mixins. -->

           <param-name>tapestry.app1-package</param-name>

           <param-value>com.myapplication.catalog</param-value>

      </context-param>

 

      <filter>

           <filter-name>app1</filter-name>

 
<filter-class>org.apache.tapestry.TapestryFilter</filter-class>

      </filter>

      <filter-mapping>

            <filter-name>app1</filter-name>

            <url-pattern>/catalog/*</url-pattern>

      </filter-mapping> 

<!-- ============================================= -->

      <context-param>

           <!-- The only significant configuration for Tapestry 5, this
informs Tapestry

               of where to look for pages, components and mixins. -->

           <param-name>tapestry.app2-package</param-name>

           <param-value>com.myapplication.ordering</param-value>

      </context-param>

      <filter>

           <filter-name>app2</filter-name>

 
<filter-class>org.apache.tapestry.TapestryFilter</filter-class>

      </filter>

      <filter-mapping>

            <filter-name>app2</filter-name>

            <url-pattern>/order/*</url-pattern>

      </filter-mapping>

<!-- ============================================= -->

 


Re: T5: web.xml - multiple applications?

Posted by Howard Lewis Ship <hl...@gmail.com>.
That would take some doing, it's something I thought of and dismissed.
 T4 supports it, and that's one of the reasons it's so complex to
discuss which files are stored where.  To me, this would be a
low-priority enhancement.

On 6/7/07, Bruce Petro <bp...@artromick.com> wrote:
> I was thinking for development purposes it might be desirable to have
> multiple contexts.
>
> But I don't see how to tie a context-param (which determines which
> classes handle the requests) to a filter definition (which specifies a
> url pattern to handle)
>
> I'm making a wild guess that in the sample "app" setup, perhaps it's the
> app in the "tapestry.app-package" perhaps matches the app in the
> filter-name.
>
> Is that how they are paired up?  If so, then please confirm this is how
> you would do this. If this isn't true - can someone specify how it's
> done?
>
>
>
> Thanks.
>
>
>
> <!-- ============================================= -->
>
>       <context-param>
>
>            <!-- The only significant configuration for Tapestry 5, this
> informs Tapestry
>
>                of where to look for pages, components and mixins. -->
>
>            <param-name>tapestry.app1-package</param-name>
>
>            <param-value>com.myapplication.catalog</param-value>
>
>       </context-param>
>
>
>
>       <filter>
>
>            <filter-name>app1</filter-name>
>
>
> <filter-class>org.apache.tapestry.TapestryFilter</filter-class>
>
>       </filter>
>
>       <filter-mapping>
>
>             <filter-name>app1</filter-name>
>
>             <url-pattern>/catalog/*</url-pattern>
>
>       </filter-mapping>
>
> <!-- ============================================= -->
>
>       <context-param>
>
>            <!-- The only significant configuration for Tapestry 5, this
> informs Tapestry
>
>                of where to look for pages, components and mixins. -->
>
>            <param-name>tapestry.app2-package</param-name>
>
>            <param-value>com.myapplication.ordering</param-value>
>
>       </context-param>
>
>       <filter>
>
>            <filter-name>app2</filter-name>
>
>
> <filter-class>org.apache.tapestry.TapestryFilter</filter-class>
>
>       </filter>
>
>       <filter-mapping>
>
>             <filter-name>app2</filter-name>
>
>             <url-pattern>/order/*</url-pattern>
>
>       </filter-mapping>
>
> <!-- ============================================= -->
>
>
>
>


-- 
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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