struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Pontarelli <br...@pontarelli.com>
Subject Re: SmartURLs crud-example (was [PROPOSAL] Merge Able/Code Behind/Zero-Config/SmartURLs into view-behind specification)
Date Wed, 07 Nov 2007 18:14:53 GMT
Brian Pontarelli wrote:
>
>>> Okay, I reproduced this pretty easily. The environment differences 
>>> didn't matter. The /missing rendering /index is due to the default 
>>> handling of missing actions that is performed by Struts/XWork I 
>>> think. I'll have to figure out exactly which interceptor does this, 
>>> but I'm not a big fan of that behavior. These should be 404s.
>> I'm still tracking this down. I'd like to be able to disable this 
>> because it can really become a very nasty situation with relative 
>> paths. For example, if /index has a link like this:
>>
>> <a href="support">Get some support dude</a>
>>
>> And you enter a bunk URL like:
>>
>> http://www.example.com/bunk
>>
>> The use will attempt to click on the link and they'll get:
>>
>> http://www.example.com/bunk/support
> Okay, I figured out the double slash issue and the redirect thing. 
> SmartURLs is currently and somewhat blindly assuming a redirect when 
> it sees an unknown action.
>
> /bad will always redirect to /bad/
>
> I'm going to make a change so that it will only send the redirect if 
> /bad/index exists as an action or a result. While I'm in there I'll 
> also fix the slash issues. That should clean both problems up nicely. 
> Not sure why I did this originally, but it doesn't really make that 
> much sense.
Okay. That should be finished. It was somewhat tricky because the XWork 
runtime configuration returns a valid ActionConfig for any URL that ends 
in a / if you have a index action at the root. This is the default 
handling that I'm not very fond of. For now, I turned this handling off 
because of the issues I mentioned above. So, SmartURLs now only handles 
URLs directly with no default/search behavior. So, all of Jeromy's 
issues are resolved.

-bp

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


Mime
View raw message