Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
runcon
Plantuml Server
Commits
ccc71e7c
Commit
ccc71e7c
authored
Oct 16, 2013
by
Maxime Sinclair
Browse files
[TASK] Better usage of JSTL
Old core_rt reference deleted
parent
45eb4783
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/webapp/index.jsp
View file @
ccc71e7c
<%@ page
info=
"index"
contentType=
"text/html; charset=utf-8"
pageEncoding=
"utf-8"
session=
"false"
%>
<%@ taglib
uri=
"http://java.sun.com/jstl/core
_rt
"
prefix=
"c"
%>
<%@ taglib
uri=
"http://java.sun.com/
jsp/
jstl/core"
prefix=
"c"
%>
<%
String
contextRoot
=
request
.
getContextPath
();
String
host
=
"http://"
+
request
.
getServerName
()
+
":"
+
request
.
getServerPort
();
...
...
@@ -8,7 +8,6 @@ String umltext = "";
String
imgurl
=
""
;
String
svgurl
=
""
;
String
txturl
=
""
;
String
mapurl
=
""
;
Object
mapNeeded
=
request
.
getAttribute
(
"net.sourceforge.plantuml.servlet.mapneeded"
);
Object
encodedAttribute
=
request
.
getAttribute
(
"net.sourceforge.plantuml.servlet.encoded"
);
if
(
encodedAttribute
!=
null
)
{
...
...
@@ -18,7 +17,7 @@ if (encodedAttribute != null) {
svgurl
=
host
+
contextRoot
+
"/svg/"
+
encoded
;
txturl
=
host
+
contextRoot
+
"/txt/"
+
encoded
;
if
(
mapNeeded
!=
null
)
{
mapurl
=
host
+
contextRoot
+
"/map/"
+
encoded
;
pageContext
.
setAttribute
(
"
mapurl
"
,
host
+
contextRoot
+
"/map/"
+
encoded
)
;
}
}
}
...
...
@@ -69,13 +68,13 @@ if (decodedAttribute != null) {
<a
href=
"
<%=
svgurl
%>
"
>
View as SVG
</a>
<a
href=
"
<%=
txturl
%>
"
>
View as ASCII Art
</a>
<%
if
(
mapNeeded
!=
null
)
{
%>
<a
href=
"
<
%=
mapurl
%
>
"
>
View Map Data
</a>
<a
href=
"
<
c:out
value=
"
${
mapurl
}
"
/
>
"
>
View Map Data
</a>
<%
}
//endif
%>
<p
id=
"diagram"
>
<%
if
(
mapNeeded
!=
null
)
{
%>
<img
src=
"
<%=
imgurl
%>
"
alt=
"PlantUML diagram"
usemap=
"#umlmap"
/>
<map
name=
"umlmap"
>
<c:import
url=
"
<%=
mapurl
%>
"
/>
<c:import
url=
"
${
mapurl
}
"
/>
</map>
<%
}
else
{
%>
<img
src=
"
<%=
imgurl
%>
"
alt=
"PlantUML diagram"
/>
...
...
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