I've launched a small website.
I have found that I'm getting errors by users and upon investigation see that the urls they are trying to use are all lowercase whereas I've declared them as camelCase.
I've no idea why these users should be trying to use all lower case (I can't imagine anyone would actually take the time to change:
www.mysite.com/myAction.do
to
www.mysite.com/myaction.do
However I can't think of anyway this would otherwise be changed. Has anyone else experienced this where:
yourAction.do in your mapping file is then attempted to be accessed by users as youraction.do ?
I'm using Struts2.3.1, sitemesh 2.4.2 - I've never heard of or encountered such a situation and would like advice on what may be causing it if any of you have encountered the same or similar.
Are there any browsers out there that remap camelCase.do to camelcase.do ? For whatever reason.
The only 'solution' I can think of (the best out of two very ugly and inelegant workarounds) is to duplicate the action mappings in struts.xml
<action name="myAction" class="myActionClass" />
<action name="myaction" class="myActionClass" /> //added extra but what a 'dumb' solution
Edit:
Is is possible to do the same with methods?
So that:
myAction!clear.do
will still be correctly mapped with the URL:
myaction!clEAr.do
?
I notice from re-reading my error logs that it's the 'wrong case' method in the ULR which is causing most errors.