Package it.hotel.controller.map

Source Code of it.hotel.controller.map.MapController

package it.hotel.controller.map;


import it.hotel.model.structure.Structure;
import it.hotel.model.structure.manager.IStructureManager;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;


public class MapController implements Controller{
 
  IStructureManager structureManager;
 
  public ModelAndView handleRequest(HttpServletRequest req,
      HttpServletResponse resp) throws Exception {
    String idString = req.getParameter("id");
    
    String address= null;
    Structure hotel = (Structure) structureManager.get(Integer.parseInt(idString));
    address= hotel.getAddress()+","+hotel.getCity()+" "+"italia";
   
    ModelAndView mv= new ModelAndView("map","hotel",hotel) ;
   
      
       
     
       return mv;
  }

  public IStructureManager getStructureManager() {
    return structureManager;
  }

  public void setStructureManager(IStructureManager structureManager) {
    this.structureManager = structureManager;
  }



}
TOP

Related Classes of it.hotel.controller.map.MapController

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.