package test.web;
import es.internna.annotations.LogDebug;
import es.internna.spring.annotations.AutowireToController;
import es.internna.spring.annotations.Bean;
import es.internna.spring.annotations.UrlMapping;
import es.internna.spring.context.AnnotationUrlHandlerMapping;
import es.internna.spring.mvc.api.AbstractRequestHandler;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.web.servlet.ModelAndView;
@Bean(name="secondAction")
@UrlMapping("two.action")
@AutowireToController(controllerBean="actionController")
public class SecondAction extends AbstractRequestHandler
{
private Log log = LogFactory.getLog(AnnotationUrlHandlerMapping.class);
@LogDebug(loggerClass=SecondAction.class)
public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception
{
Map<String, Object> result = new HashMap<String, Object>();
result.put("actionResult", 100);
result.put("anotherActionResult", "A result");
return new ModelAndView("reached", result);
}
}