Refactoring of the welcome diagram.

This commit is contained in:
Maxime Sinclair
2011-03-09 16:55:57 +01:00
parent c98015f417
commit 5c149977fb
4 changed files with 49 additions and 9 deletions

View File

@@ -0,0 +1,30 @@
package net.sourceforge.plantuml.servlet;
import java.io.IOException;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/*
* Welcome servlet of the webapp.
* Displays the sample Bob and Alice sequence diagram.
*/
public class Welcome extends HttpServlet {
@Override
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");
// forward to index.jsp
RequestDispatcher dispatcher = request.getRequestDispatcher("/index.jsp");
dispatcher.forward(request, response);
}
}