WebApp.Controller.TeacherController.java Source code

Java tutorial

Introduction

Here is the source code for WebApp.Controller.TeacherController.java

Source

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package WebApp.Controller;

import WebApp.Util.Constants;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

/**
 *
 * @author shamim
 */
public class TeacherController implements Controller {

    @Override
    public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
        String requestedUri = request.getRequestURI();

        ModelAndView modelAndView = null;

        if (requestedUri.contains(Constants.INCOURSE_MARK_DISTIBUTION)) {
            modelAndView = new ModelAndView("incourseMarkingScope");
            return modelAndView;
        }

        return modelAndView;
    }

}