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 redfire is 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
and access with
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.webapp.WebAppContext; ..... public void initializePlugin(PluginManager manager, File pluginDirectory)
ContextHandlerCollection contexts = HttpBindManager.getInstance().getContexts();
context = new WebAppContext(contexts, pluginDirectory.getPath(), "/" + NAME);
thanks dele, however, by this method i can only access pure html or data files.
is it able to access JSP files also?
i put the JSP files in my plugin folder, but [
ant plugins] doesn’t compile it at all.
it only compiles those JSP files in ‘my-plugin/src/web’, these files are for admin console,
not for opening through public port 7070.
this thread solves the problem by allowing public access thru’ port 9090
I want share the solution of this problem I had today. It took me 5 hours of living hell to figure solve it. When create a public .jsp page, there are TWO things you need to do. in your plugin, you need the following: private static final String...
Reading time: 1 mins 🕑
Likes: 3 ❤
in your plugin, you need the following:
private static final String URL = “userservice/sign-in.jsp”; // replace with your plugin/your.jsp
In init() function I have to add:
And in destroy():
In the .jsp page, you need the following:
If you don’t have this meta tag in your jsp, you will get the following error: