Hi
I think you have an url mapping issue : I guess Stripes dispatcher is mapped
on "*.action", so :
http://.../myapp/search.action?searchString=foo...-> OK
http://.../myapp/search?searchString=foo -> Error
Otherwise the clean URLs should work by default, so :
http://.../myapp/search.action/foo -> OK
If you want to do it like this :
http://.../myapp/search/foo
Then you have two options :
* define a mapping for dispatcher servlet on all your beans (as you don't
have the *.action suffix)
* use Dynamic Mapping Filter
HTH
Cheers
Remi
2010/10/3 Oddbjørn Sjøgren <bj...@yaymicro.com>
> Hi
>
>
> I'm trying to implement clean URLs in a project, but I can't get to work.
> Right now the web.xml file has theese mappings:
>
>
> <servlet-mapping>
>
> <servlet-name>default</servlet-name>
>
> <url-pattern>/</url-pattern>
>
> </servlet-mapping>
>
>
> <servlet-mapping>
>
> <servlet-name>jsp</servlet-name>
>
> <url-pattern>*.jsp</url-pattern>
>
> </servlet-mapping>
>
>
> <servlet-mapping>
>
> <servlet-name>jsp</servlet-name>
>
> <url-pattern>*.jspx</url-pattern>
>
> </servlet-mapping>
>
>
> My ActionBeans all have a URL binding like UrlBinding("/search.action") on
> them, and the link http://domain.com/search.action?searchString=foo obviously
> searches for "foo". Now here is what I want:
>
>
> - All urls should work as they are now (I don't want a lot of dead links)
>
> - In addition I want to introduce urls that look like
> http://domain.com/search/foo
>
>
> Basically my question is how to achieve this. So far I've only tried to
> change the the binding in the ActionBean to
> @UrlBinding("/search/{searchString}") but that only leads to 404 errors. I
> guess there is something I need to do in the web.xml file, but I just can't
> understand what to do. I also understand that there is some way to override
>
> NameBasedActionResolver, but I'm not sure how to do this? Can I just write
> a new class that extends it and override it's methods? Will this class
> magically be used instead, or do I have to tell Stripes to use it somehow?
>
>
> I'm running stripes 1.5.3 and java 1.6.0 on Linux
>
>
> Any help is greatly appreciated.
>
>
> Regards,
>
> Bjorn
>
>
> ------------------------------------------------------------------------------
> Virtualization is moving to the mainstream and overtaking non-virtualized
> environment for deploying applications. Does it make network security
> easier or more difficult to achieve? Read this whitepaper to separate the
> two and get a better understanding.
> http://p.sf.net/sfu/hp-phase2-d2d
> _______________________________________________
> Stripes-users mailing list
> Stripes-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>
>
------------------------------------------------------------------------------
Virtualization is moving to the mainstream and overtaking non-virtualized
environment for deploying applications. Does it make network security
easier or more difficult to achieve? Read this whitepaper to separate the
two and get a better understanding.
http://p.sf.net/sfu/hp-phase2-d2d
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users