Remember that in web.xml it has to say like the following - url-pattern 
is important here.
I've had many problems with binding to / and in the end just wrote my 
own filter which rewrites some URLs (eg. / to /home). If You'd like, I 
can give it to You.

    <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>



Freddy Daoud pisze:
> Hi Stephen,
>
> You can do this:
>
> @UrlBinding("/")
> public class YourActionBean implements ActionBean {
>   @DefaultHandler
>   public Resolution something() {
>      ...
>   }
> }
>
> Hope that helps. Sorry for the quick minimal answer but I'm short on
> time, let me know if you need more details.
>
> Cheers,
> Freddy
> http://www.stripesbook.com
>
> On Sun, 18 Oct 2009 21:51:50 +0100, "Stephen Nelson"
> <step...@eccostudio.com> said:
>   
>> Hello,
>>
>> I'm just beginning development with Stripes having come from Struts2  
>> and Wicket in the past. I have a question which I feel is probably a  
>> FAQ but couldn't find it either on the stripes site or with some  
>> Google searching. Maybe I missed it though.
>>
>> Anyway I want to map an action to the context root (e.g. /), so that a  
>> user browsing www.example.com will run my action. I don't really want  
>> a index.jsp doing a redirect so wondered if this had been tackled  
>> before. I am using the dynamic mapping filter if that makes any  
>> difference.
>>
>> Also just a quick word of thanks to the developers working on this  
>> framework. It truly is the best MVC-based framework I have seen in  
>> Java so far. Really easy to get going with and doesn't get in your way.
>>
>> Many thanks,
>>
>> --
>> Stephen Nelson
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart your
>> developing skills, take BlackBerry mobile applications to market and stay 
>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>> http://p.sf.net/sfu/devconference
>> _______________________________________________
>> Stripes-users mailing list
>> Stripes-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/stripes-users
>>     
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay 
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Stripes-users mailing list
> Stripes-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>
>   


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to