[Geoserver-devel] [jira] Created: (GEOS-4761) AdvancedDispatchFilter throws NPE for additional non directory servlet mappings

AdvancedDispatchFilter throws NPE for additional non directory servlet mappings
-------------------------------------------------------------------------------

                 Key: GEOS-4761
                 URL: https://jira.codehaus.org/browse/GEOS-4761
             Project: GeoServer
          Issue Type: Bug
          Components: Global
    Affects Versions: 2.1.1
            Reporter: Tobias Warneke
            Assignee: Andrea Aime
         Attachments: AdvancedDispatchFilter_patch.diff

I have some servlets calling geoserver services in a configured way (similar to your reflector). In geoserver 1.7.x it worked perfectly.

Example:
A servlet handles the following request: /test?layer=name. The servlet itself calls geoserver to check if the requested layer is available and delivers a result. (This is only an example and I known it is better done with rest or a capabilitis-Request.)

Now in Geoserver 2.1.1 the Spring dispatcher servlet is mapped to /*. To avoid problems the AdvancedDispatchFilter corrects incoming requests. For my servlets it throw a NPE because getPathInfo - returns a null value and therefore path.indexOf('/', 1); does not work.

If I map my servlet to subdirectories, instead of "/test" to "/test/a" there is no problem.

I have appended a patch to correct this.

Thanks

Tobias

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira