Openfire Plugin Servlet mapping

Hi everyone,

my company has developed and uses several openfire plugins successfully, but we have repeatedly encountered issues with some aspects of plugin development and setup.

The provided guides are very useful, however I think they can be improved in several important aspects.

Namely:

For example the plugin.xml explanation should be expanded to include more examples of valid adminconsole tab setups (I always end up having to look for a plugin with a similar menu, look at the source and figure out what works and what doesn’t. The fact side menus do not seem available except with the already existing Tabs is not documented, or doesn’t work as it should.

But a more serious issue is with servlets. We have several plugins providing REST interfaces to external components (Similar to UserService), however we have a very hard time with the Mapping.

I have a basic understanding of servlet mapping however, we have considerable trouble getting Openfire to consistently call our servlets, more so in plugins that also have admin jsps, Openfire.

We think that a testing function, or a more comprehensive tutorial with examples of how to provide mapping with mixed jsps and servlets would be very useful.

For example.

in one plugin that we will call pushservlet (Handles HTTP to XMPP Notifications to our client devices) we have this scenario.

the plugin name is pushservlet.jar

the Servlet class itself is called PushServlet.

the mapping is as follows

PushServlet

org.jivesoftware.openfire.plugin.servlet.PushServlet</servlet-cl ass>

0

PushServlet

/PushServlet

It also has a few admin pages under the admin path.

calls to openfireserver.com/plugins/PushServlet all go to the servlet successfully.

This one works fine. The paths are also added to the AuthCheckFilter excludes.

Another plugin, an evolution of the old xmpp2apns plugin.

has this:

xmpp2apns

Xmpp2ApnsLiveboxListener

org.jivesoftware.openfire.plugin.xmpp2apns.servlet.Xmpp2ApnsLive boxListener

1

Xmpp2ApnsLiveboxListener

/Xmpp2Apns

This one too has nearly identical configuration pages, but calls to

openfireserver.com/plugins/Xmpp2Apns all get redirected to the configuration pages .

This one doesn’t work , and consistently calls the configuration jsps.

So the question is, is there something specific about how openfire resolves paths? Best practises? We are stumped, sometimes it works, sometimes it doesn’t.

What can we do to reliably map and test this path resolution?

Thanks in advance

Paul

The message has been modified as it was sent too early during composition.