Servlets and Filters can only be mapped to /app in OSGi plugins
As of this writing OSGi plugins only allow Servlets and Filters to be mapped on a folder behind the /app folder. This limits us in the things that our plugins can do. We feel that dotCMS should add a method in its API to map filters and servlets to any folder.
We are building something small ourselves now but this has to be deployed as an old school static plugin. This is a little strange of course because building static plugins is something we're trying to prevent.
you can change it on the web.xml
<servlet-mapping>
<servlet-name>proxy</servlet-name>
<url-pattern>/app/*</url-pattern>
</servlet-mapping>
I would be interesting to test what happens when you just map it to /. Try it and let us know :)
We have tried to change the url-pattern to '/*'. The servlets and filters are then indeed mapped the way we want, but for the rest nothing works anymore. All CMS pages and also the admin pages will return nothing more than a blank page.
It looks like all other filters will be skipped if we change the mapping of the OSGi proxy servlet.
Ok so it looks like we do have to improve something here. The OSGI proxy needs to be some kind of filter instead and let the chain continues to the CMS part if no OSGI mapping is set for that mapping
You can't map a servlet to / - it will pick up all the requests. We need an OSGIFilter that will let requests pass if they do not match a mapped pattern
Will Ezell http://dotcms.com phone: (305) 900-2001 ext. 7010 direct: (978) 294-9429 https://www.google.com/voice/b/0?pli=1#phones skype: wezell1
On Thu, Dec 5, 2013 at 9:30 AM, Jorge Urdaneta [email protected]:
Ok so it looks like we do have to improve something here. The OSGI proxy needs to be some kind of proxy instead and let the chain continues to the CMS part if no OSGI mapping is set for that mapping
—
Reply to this email directly or view it on GitHubhttps://github.com/dotCMS/dotCMS/issues/4517#issuecomment-29901485 .
This issue has been automatically marked as stale because it has not had activity within the past 90 days. It will be closed in 30 days no further activity occurs. Thank you.