Guest User

ScheduleLoadController

a guest
Dec 20th, 2012
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.57 KB | None | 0 0
  1. public class ScheduleLoadController{
  2.    
  3.    
  4. //  @RequestMapping(value="/ScheduleLoad", method = RequestMethod.GET)
  5. //      public ModelAndView ScheduleLoad() {
  6. //          return new ModelAndView("ScheduleLoad","command", new ScheduleLoad());
  7. //  }
  8. // 
  9.     public ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object command, BindException errors)
  10.         throws Exception {
  11.        
  12.         String aMessage = "ScheduleLoad Test";
  13.        
  14.         ApplicationContext context = new ClassPathXmlApplicationContext("spring-config.xml");
  15.        
  16.         ScheduleLoad scheduleLoadData = (ScheduleLoad)command;
  17.        
  18.         ScheduleLoadJDBCTemplate ScheduleLoadJDBCTemplate = (ScheduleLoadJDBCTemplate)context.getBean("ScheduleLoadJDBCTemplate");
  19.        
  20.         System.out.println("------Records Creation--------" );
  21.         ScheduleLoadJDBCTemplate.create("2011");
  22.        
  23.         return new ModelAndView("confirmLoadTest","scheduleLoadData",scheduleLoadData);
  24.     }
  25.    
  26. //  @Override
  27. //  public ModelAndView handleRequest(HttpServletRequest arg0,
  28. //          HttpServletResponse arg1) throws Exception {
  29. //     
  30. //     
  31. //      String aMessage = "ScheduleLoad Test";
  32. //     
  33. //      ApplicationContext context = new ClassPathXmlApplicationContext("spring-config.xml");
  34. //     
  35. //      ScheduleLoadJDBCTemplate ScheduleLoadJDBCTemplate = (ScheduleLoadJDBCTemplate)context.getBean("ScheduleLoadJDBCTemplate");
  36. //     
  37. //      System.out.println("------Records Creation--------" );
  38. //      ScheduleLoadJDBCTemplate.create("2011");
  39. //     
  40. //      ModelAndView modelAndView = new ModelAndView("scheduleLoad");
  41. //      modelAndView.addObject("message", aMessage);
  42. //      return modelAndView;
  43. //  }
  44.  
  45. }
Advertisement
Add Comment
Please, Sign In to add comment