I'm using Openfire as the chat server for my company. And now I need to create a plugin for Openfire.
As I can see from other plugins, they can have HTTP binding to themself through port 7070. For example: http://example.com:7070/redfire where redfireis the name of the plugin.
The name of my plugin is toplug, so I want to be able to access the JSP pages of my plugin through:http://example.com:7070/toplug/index.jsp where 'index.jsp' is some example page.
But when I try to access my JSP pages through port 7070, the Jetty server (on which Openfire runs) always reports error 404 'page not found'. I guess this is because the binding to my folder which contains JSP pages hasn't been set. How to do this binding thing please?

You do not need a plugin to access the web service for the http bing port. Just put your web pages in a folder under
OPENFIRE_HOME/openfire/resources/spank
and access with
http://your_server:7070/your_folder/your_page.html
Note that Openfire does not compile JSP pages unless you replace jasper-xxxx.jar files in the lib folder
If you still want to create a jetty web context (application) from your plugin, see source code of Redfire plugin
import org.eclipse.jetty.server.handler.ContextHandlerCollection;
import org.eclipse.jetty.webapp.WebAppContext;
.....
public void initializePlugin(PluginManager manager, File pluginDirectory)
{
ContextHandlerCollection contexts = HttpBindManager.getInstance().getContexts();
context = new WebAppContext(contexts, pluginDirectory.getPath(), "/" + NAME);
context.setWelcomeFiles(new String[]{"index.html"})