Danny, I responded this question already.  Here it is again in case you
missed it.

You could use the DynamicMappingFilter defined like this in your web.xml

<filter>
        <filter-name>DynamicMappingFilter</filter-name>

<filter-class>net.sourceforge.stripes.controller.DynamicMappingFilter</filter-class>
    </filter>

    <filter-mapping>
        <filter-name>DynamicMappingFilter</filter-name>
        <url-pattern>/*</url-pattern>
        <dispatcher>REQUEST</dispatcher>
        <dispatcher>FORWARD</dispatcher>
        <dispatcher>INCLUDE</dispatcher>
    </filter-mapping>

Then on your action bean, define a url binding like so

@UrlBinding("/invitecode/{code}/")
public class InviteCodeActionBean ..... {

    private String code;
    .......
}

Keep in mind that you'll need a method marked as @DefaultHandler since your
URL doesn't specify an event.


On Mon, Mar 30, 2009 at 9:49 AM, Danny C <daniel.c...@gmail.com> wrote:

>
> team,
>
> i have stripes working like a pro with my app, so this is not a basic setup
> question.
>
> i currently have the standard
>
>        <servlet-mapping>
>                <servlet-name>DispatcherServlet</servlet-name>
>                <url-pattern>*.action</url-pattern>
>        </servlet-mapping>
>
> which works great. how do i accomplish the following
>
> I want to allow for a "special" url to be mapped to stripes. my standard
> urls are
> http://mysite.com/app/foo.action
> http://mysite.com/app/bar.action
>
> i want to create a special mapping to allow users to go to:
> http://mysite.com/invitecode/<theirinvitecode>
>
> thus - I want /invitecode/* to map to InviteCodeActionBean and then be able
> to access the subsequent data as a parameter. I knew how to do this in
> struts, but seems to be getting tangled up with stripes on this one. I know
> there must be a dozen ways to do it, but i'll settle for one that works. :)
>
> thanks in advance.
>
> dan
> --
> View this message in context:
> http://www.nabble.com/web.xml-URL-pattern-help-tp22744800p22744800.html
> Sent from the stripes-users mailing list archive at Nabble.com.
>
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Stripes-users mailing list
> Stripes-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>
------------------------------------------------------------------------------
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to