[TASK] Scriptlet replaced by EL

This commit is contained in:
Maxime Sinclair
2013-10-17 14:39:51 +02:00
parent ccc71e7cd4
commit dc7bc3e179
3 changed files with 44 additions and 56 deletions

View File

@@ -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

View File

@@ -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");