struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Shnir <>
Subject Bug / Edge case
Date Thu, 18 Feb 2010 15:35:21 GMT
Hi all, decided to post the recent issue I discovered with struts 2 here
before submitting a jira bug -- need to determine if this was a bug to begin
with :)

Essentially, we have all actions of struts 2 mapped to * -- no extension.
 One of the action handlers uses the following path:  This setup works well in most cases
except when the parameter we use contains a dot (.), example:  For some reason, the
org.apache.struts2.dispatcher.mapper.DefaultActionMapper will return null
mapping for this.  After a brief look into the source, I've noticed that
dropExtension method contains code that determines if this is right mapping
or not based on an empty extension and this code:

                int index = name.lastIndexOf('.');
                if (index == -1 || name.indexOf('/', index) >= 0) {
                    return name;

Lines 467-470.

I've modified this for our local struts installation, tho this needs to be
resolved in the core build, I think the dropExtension only when extensions
are defined in the struts.xml or mapping.  Also, what was the case for this
item to begin with?  Thanks!


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message