ManageAdministrators.java
// license-header java merge-point
// Generated by andromda-jsf cartridge (flow\ActionForward.java.vsl) DO NOT EDIT!
package org.andromda.samples.carrental.admins.web.admin;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.andromda.samples.carrental.FacesContextUtils;
/**
* This servlet is used to allow controller operation execution through
* a URL call.
*/
@WebServlet("/org/andromda/samples/carrental/admins/web/admin/manage-administrators.jsf")
public class ManageAdministrators
extends HttpServlet
{
/**
* The serial version UID of this class. Needed for serialization.
*/
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#doGet(HttpServletRequest, HttpServletResponse)
*/
@Override
public void doGet(
final HttpServletRequest request,
final HttpServletResponse response)
throws ServletException, IOException
{
// - we need to resolve the controller differently since we're outside of the faces servlet
AdminAdminController controller =
(AdminAdminController)FacesContextUtils.resolveVariable(
request, response,
"adminAdminController");
final String forwardPath;
try
{
forwardPath = controller.startUseCase();
}
catch(Throwable t)
{
throw new ServletException(t);
}
if(forwardPath != null){
request.getRequestDispatcher(forwardPath).forward(request, response);
}
}
/**
* @see HttpServlet#doPost(HttpServletRequest, HttpServletResponse)
*/
@Override
public void doPost(
final HttpServletRequest request,
final HttpServletResponse response)
throws ServletException, IOException
{
this.doGet(request, response);
}
}