struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose L Martinez-Avial (JIRA)" <>
Subject [jira] [Created] (WW-4199) Exclusion of URLs should be done before calling prepare.
Date Fri, 13 Sep 2013 23:08:52 GMT
Jose L Martinez-Avial created WW-4199:

             Summary: Exclusion of URLs should be done before calling prepare.
                 Key: WW-4199
             Project: Struts 2
          Issue Type: Bug
          Components: Dispatch Filter
            Reporter: Jose L Martinez-Avial
            Priority: Minor

I have some webservices under /services in my webapp, and I have excluded them from Struts
by using the excludePattern filter:


The problem is that the classes StrutsPrepareAndExecuteFilter and StrutsPrepareFilter do some
calls before to prepare before checking if the URL should be treated. In the case of the webservices
it provokes the following exception:

####<Sep 13, 2013 6:38:54 PM EDT> <Error> <HTTP> <naboo.mia.usa.sinvest>
<EcoPrdInt> <[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'>
<<anonymous>> <> <> <1379111934567> <BEA-101108> <[weblogic.servlet.internal.WebAppServletContext@2f97ff
- appName: 'test-int', name: 'test-int.war', context-path: '/test-int', spec-version: '2.5']
Unsupported encoding: "UTF-8; action="urn:publishDocumentForSignature"" specified. Unsupported Encoding UTF-8; action="urn:publishDocumentForSignature"
        at weblogic.servlet.internal.ServletRequestImpl.setCharacterEncoding(
        at weblogic.servlet.internal.ServletRequestImpl.initRequestEncoding(
        at weblogic.servlet.internal.ServletRequestImpl.getCharacterEncoding(
        at org.apache.struts2.dispatcher.Dispatcher.applyEncoding(
        at org.apache.struts2.dispatcher.Dispatcher.prepare(

And that's due to the filter calling prepare to set the encoding and localem in the follow
        try {
            prepare.setEncodingAndLocale(request, response);
            prepare.createActionContext(request, response);
            if (excludedPatterns != null && prepare.isUrlExcluded(request, excludedPatterns))
                chain.doFilter(request, response);
            } else {
 But if the URL is going to be excluded, why is it doing that call? I think the calls to prepare
should be done after checking the URL for exclusions. Unless I'm missing something, it shouldn't
impact anything, right?



This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message