diff --git a/src/main/java/net/sourceforge/plantuml/servlet/PlantUmlServlet.java b/src/main/java/net/sourceforge/plantuml/servlet/PlantUmlServlet.java
index 83df010..2faa686 100644
--- a/src/main/java/net/sourceforge/plantuml/servlet/PlantUmlServlet.java
+++ b/src/main/java/net/sourceforge/plantuml/servlet/PlantUmlServlet.java
@@ -140,12 +140,12 @@ public class PlantUmlServlet extends HttpServlet {
encoded = transcoder.encode(text);
}
- request.setAttribute("net.sourceforge.plantuml.servlet.decoded", text);
- request.setAttribute("net.sourceforge.plantuml.servlet.encoded", encoded);
+ request.setAttribute("decoded", text);
+ request.setAttribute("encoded", encoded);
// check if an image map is necessary
if (text != null && PlantumlUtils.hasCMapData(text)) {
- request.setAttribute("net.sourceforge.plantuml.servlet.mapneeded", Boolean.TRUE);
+ request.setAttribute("mapneeded", Boolean.TRUE);
}
// forward to index.jsp
diff --git a/src/main/java/net/sourceforge/plantuml/servlet/Welcome.java b/src/main/java/net/sourceforge/plantuml/servlet/Welcome.java
index 2d37c60..5088318 100644
--- a/src/main/java/net/sourceforge/plantuml/servlet/Welcome.java
+++ b/src/main/java/net/sourceforge/plantuml/servlet/Welcome.java
@@ -42,8 +42,8 @@ public class Welcome extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
// set the sample
- request.setAttribute("net.sourceforge.plantuml.servlet.decoded", "Bob -> Alice : hello");
- request.setAttribute("net.sourceforge.plantuml.servlet.encoded", "SyfFKj2rKt3CoKnELR1Io4ZDoSa70000");
+ request.setAttribute("decoded", "Bob -> Alice : hello");
+ request.setAttribute("encoded", "SyfFKj2rKt3CoKnELR1Io4ZDoSa70000");
// forward to index.jsp
RequestDispatcher dispatcher = request.getRequestDispatcher("/index.jsp");
diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp
index 1e636cb..bc677af 100644
--- a/src/main/webapp/index.jsp
+++ b/src/main/webapp/index.jsp
@@ -1,31 +1,16 @@
<%@ page info="index" contentType="text/html; charset=utf-8" pageEncoding="utf-8" session="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
-<%
-String contextRoot = request.getContextPath();
-String host = "http://" + request.getServerName() + ":" + request.getServerPort();
-String encoded = "";
-String umltext = "";
-String imgurl = "";
-String svgurl = "";
-String txturl = "";
-Object mapNeeded = request.getAttribute("net.sourceforge.plantuml.servlet.mapneeded");
-Object encodedAttribute = request.getAttribute("net.sourceforge.plantuml.servlet.encoded");
-if (encodedAttribute != null) {
- encoded = encodedAttribute.toString();
- if (!encoded.isEmpty()) {
- imgurl = host + contextRoot + "/img/" + encoded;
- svgurl = host + contextRoot + "/svg/" + encoded;
- txturl = host + contextRoot + "/txt/" + encoded;
- if (mapNeeded != null) {
- pageContext.setAttribute("mapurl", host + contextRoot + "/map/" + encoded);
- }
- }
-}
-Object decodedAttribute = request.getAttribute("net.sourceforge.plantuml.servlet.decoded");
-if (decodedAttribute != null) {
- umltext = decodedAttribute.toString();
-}
-%>
+
+
+
+
+
+
+
+
+
+
+
@@ -34,9 +19,9 @@ if (decodedAttribute != null) {
-
-
-
+
+
+
PlantUMLServer
@@ -47,40 +32,43 @@ if (decodedAttribute != null) {
<%-- CONTENT --%>
-
You can enter here a previously generated URL:
-
+
-
+
- <% if (!imgurl.isEmpty()) { %>
-
-
View as SVG
-
View as ASCII Art
- <% if (mapNeeded != null) { %>
-
">View Map Data
- <% } //endif %>
-
- <% if (mapNeeded != null) { %>
-
-
-
-
- <% } else { %>
-
- <% } %>
-
- <% } //endif %>
+
+
+ View as SVG
+ View as ASCII Art
+
+ View Map Data
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+