On 30-10-2009 at 01:05, Annie Lane wrote:
> I'm currently working on my first stripes app. This is what I want:
> 
> When a user goes to my site e.g. http://mysite.com/ I want there to be a
> form on that page where they can enter some information and press 'submit'.
[...]

> I'n my web.xml I'm using the DynamicMappingFilter, configured like this:
[...]

> and the action that the page will execute on form submission is below. My
> problem is that my shorten() method doesn't seem to be gettting called. If I
> change the @UrlBinding("/") to (for example) @UrlBinding("/moo") it works
> fine. I don't want moo to be in my URL though... Can anyone help me out
> here? I feel like I'm missing something important and obvious but I've been
> staring at this too long to figure it out. Thanks for any help.
> 
> @UrlBinding("/")
> public class CreateTinyURLActionBean implements ActionBean {
[...]


The problem here is that:
a) a binding must start with a '/'
b) any binding ending in '/' is mapped as prefix

So the binding @UrlBinding("/") ensures that any request that cannot be
mapped elsewhere is mapped to CreateTinyURLActionBean. Not what you want.

Incidentally, this exact situation is what prompted me to report this:
http://www.stripesframework.org/jira/browse/STS-688

A solution has not been decided upon yet.


Oscar

-- 
   ,-_
  /() ) Oscar Westra van Holthe - Kind      http://www.xs4all.nl/~kindop/
 (__ (
=/  ()  Even if you win the rat race, you are still a rat...

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