001 package com.khubla.pragmatach.examples.jspexample; 002 003 import java.util.Date; 004 005 import com.khubla.pragmatach.framework.annotation.Controller; 006 import com.khubla.pragmatach.framework.annotation.Route; 007 import com.khubla.pragmatach.framework.annotation.View; 008 import com.khubla.pragmatach.framework.api.PragmatachException; 009 import com.khubla.pragmatach.framework.api.Response; 010 import com.khubla.pragmatach.plugin.jsp.JSPController; 011 012 @Controller(name = "IndexController") 013 @View(view = "/index.jsp") 014 public class IndexController extends JSPController { 015 /** 016 * the message 017 */ 018 private final String message = "hello world"; 019 020 public String getMessage() { 021 return message; 022 } 023 024 public String getTime() { 025 return new Date().toString(); 026 } 027 028 @Override 029 @Route(uri = "/") 030 public Response render() throws PragmatachException { 031 return super.render(); 032 } 033 }