3.9及以下版本会有readme.html页面乱码问题,修改plugin-admin.jsp
<% if (showReadme) {
String pluginName = ParamUtils.getParameter(request, "plugin");
Plugin plugin = pluginManager.getPlugin(pluginName);
StringBuilder readmeString = new StringBuilder();
if (plugin != null) {
File readme = new File(pluginManager.getPluginDirectory(plugin), "readme.html");
if (readme.exists()) {
BufferedReader in = null;
try {
in = new BufferedReader(new InputStreamReader(new FileInputStream(readme), "UTF8"));
String line;
while ((line = in.readLine()) != null) {
readmeString.append(line);
readmeString.append(System.getProperty("line.separator"));
}
}
catch (IOException ioe) {
ioe.printStackTrace();
}
finally {
if (in != null) {
try {
in.close();
}
catch (Exception e) {
}
}
}
}
}
%>
jsp编译后存放在 openfire\plugins\admin\webapp\WEB-INF\lib\admin-jsp.jar 下,部署时放对应文件夹即可。