struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mounir Benzid ...@meetingmasters.de>
Subject Does the orrder of wildcard-annotated methods effects greediness?
Date Wed, 07 Mar 2012 17:39:45 GMT
Here is a simple example showing two methods in the given order

     
/*******************************************************************************************/
     @Override
     @Action(value="/do/some/specificstuff/{thing}", 
results={@Result(location = "result.jsp")}),
     public String execute() throws Exception {...}


     
/*******************************************************************************************/
     @Override
     @Action(value="/do/some/{thing}", results={@Result(location = 
"result.jsp")}),
     public String input() throws Exception {...}



Now if the request contains myApp/do/some/specificstuff/eat


which action will fire? I my case it's the input() method but it really 
should be the execute()  method.
The parameter "thing" in the second annotation then equals 
"specificstuff/eat"


Is it possible to control the "greediness" of the patternmatcher? Using 
XML notation one could simply control
this behaviour by  reordering the <action> tags.

Thanks

- Mounir



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message