powered by Jive Software

Plugin admin pages


Hi, it’s me again.
I’m in the process of updating our company custom plugins for openfire 4.3.2 (We previously ran stable on 4.1.6).
I have of course started migrating to maven, but that’s ok, and I am grateful for the amount of examples provided by the other plugins in this direction.
I am having a bit of a headache with jsp admin pages though.
From the logs it looks like they are being compiled correctly, and the menu items are added in Openfire Web Admin UI, however, if I click on any of them, not a single one works. They all go out as not found with a 404. There doesn’t seem to be anything in the logs either.

From my understanding, to get a jsp added to the admin UI we need to:

  1. Specify where it goes in the plugin.xml
  2. Specify pageId in the jsp
  3. Add jetty-jspc-maven-plugin in the pom plugins
  4. Add com.sun.jersey.Bundle to dependencies in pom.

Now, my experience is very limited with Maven, so it may be that I’m missing something.
I can provided anonimized poms and plugin files if needed.

Thanks in advance, any help welcome as I’m stumped as to why they’re not getting loaded.
Paolo Manili


Your best bet is to start with a working plugin; https://github.com/igniterealtime/openfire-xmldebugger-plugin is perhaps the simplest around, it only has one JSP page, but it does work.

There are a number of things to note;

  • The pom.xml specifies the maven-assembly-plugin to bundle the files up in to the required JAR format.
  • The pom.xml specifies org.igniterealtime.openfire:plugins:4.3.0 as a parent. If you want the plugin to work on earlier versions as well, you may need to specify an older version of Jetty to compile your JSP pages (see the bookmarks plugin for how this can be done, but it does prevent you from using Java 8 syntax such as lambdas in your JSP pages). You’ll obviously also need to avoid using any features new to Openfire 4.3 to maintain backward compatibility, too.
  • You must have a src/web/WEB-INF/web.xml file for things to work. The XML Debugger plugin has the smallest possible one - it largely only exists as in indication that JSP compilation is required.




Thanks for the answer, I will try starting back from one of the working plugins as you said and try to eke out any differences in the pom or in the jsp structure.
I always had a bit of a hard time with getting the admin part of plugins to work, so it’s likely some small mistake carried over version by version and finally became incompatible with the newer versions of openfire.
Once I figure it out I’ll write here the solution, should anyone else stumble on the same path.
Paolo Manili