Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
Openfire
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Openfire
Commits
20eb8c48
Commit
20eb8c48
authored
Jan 05, 2016
by
Dave Cridland
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #487 from guusdk/OF-1025
OF-1025: Restore web-custom.xml functionality
parents
f77c0399
770fee82
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
PluginServlet.java
...va/org/jivesoftware/openfire/container/PluginServlet.java
+4
-4
No files found.
src/java/org/jivesoftware/openfire/container/PluginServlet.java
View file @
20eb8c48
...
@@ -155,7 +155,7 @@ public class PluginServlet extends HttpServlet {
...
@@ -155,7 +155,7 @@ public class PluginServlet extends HttpServlet {
}
}
Document
doc
=
saxReader
.
read
(
webXML
);
Document
doc
=
saxReader
.
read
(
webXML
);
// Find all <servlet> entries to discover name to class mapping.
// Find all <servlet> entries to discover name to class mapping.
List
classes
=
doc
.
selectNodes
(
"//
servlet"
);
List
classes
=
doc
.
getRootElement
().
elements
(
"
servlet"
);
Map
<
String
,
Class
>
classMap
=
new
HashMap
<>();
Map
<
String
,
Class
>
classMap
=
new
HashMap
<>();
for
(
int
i
=
0
;
i
<
classes
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
classes
.
size
();
i
++)
{
Element
servletElement
=
(
Element
)
classes
.
get
(
i
);
Element
servletElement
=
(
Element
)
classes
.
get
(
i
);
...
@@ -164,7 +164,7 @@ public class PluginServlet extends HttpServlet {
...
@@ -164,7 +164,7 @@ public class PluginServlet extends HttpServlet {
classMap
.
put
(
name
,
manager
.
loadClass
(
plugin
,
className
));
classMap
.
put
(
name
,
manager
.
loadClass
(
plugin
,
className
));
}
}
// Find all <servelt-mapping> entries to discover name to URL mapping.
// Find all <servelt-mapping> entries to discover name to URL mapping.
List
names
=
doc
.
selectNodes
(
"//
servlet-mapping"
);
List
names
=
doc
.
getRootElement
().
elements
(
"
servlet-mapping"
);
for
(
int
i
=
0
;
i
<
names
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
names
.
size
();
i
++)
{
Element
nameElement
=
(
Element
)
names
.
get
(
i
);
Element
nameElement
=
(
Element
)
names
.
get
(
i
);
String
name
=
nameElement
.
element
(
"servlet-name"
).
getTextTrim
();
String
name
=
nameElement
.
element
(
"servlet-name"
).
getTextTrim
();
...
@@ -211,8 +211,8 @@ public class PluginServlet extends HttpServlet {
...
@@ -211,8 +211,8 @@ public class PluginServlet extends HttpServlet {
saxReader
.
setFeature
(
"http://apache.org/xml/features/nonvalidating/load-external-dtd"
,
saxReader
.
setFeature
(
"http://apache.org/xml/features/nonvalidating/load-external-dtd"
,
false
);
false
);
Document
doc
=
saxReader
.
read
(
webXML
);
Document
doc
=
saxReader
.
read
(
webXML
);
// Find all <serv
el
t-mapping> entries to discover name to URL mapping.
// Find all <serv
le
t-mapping> entries to discover name to URL mapping.
List
names
=
doc
.
selectNodes
(
"//
servlet-mapping"
);
List
names
=
doc
.
getRootElement
().
elements
(
"
servlet-mapping"
);
for
(
int
i
=
0
;
i
<
names
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
names
.
size
();
i
++)
{
Element
nameElement
=
(
Element
)
names
.
get
(
i
);
Element
nameElement
=
(
Element
)
names
.
get
(
i
);
String
url
=
nameElement
.
element
(
"url-pattern"
).
getTextTrim
();
String
url
=
nameElement
.
element
(
"url-pattern"
).
getTextTrim
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment