Package org.sonatype.mavenbook.weather

Examples of org.sonatype.mavenbook.weather.WeatherService


public class WeatherServlet extends HttpServlet {
    public void doGet(HttpServletRequest request,
                      HttpServletResponse response)
        throws ServletException, IOException {
  String zip = request.getParameter("zip" );
  WeatherService weatherService = new WeatherService();
  PrintWriter out = response.getWriter();
        try {
      out.println( weatherService.retrieveForecast( zip ) );
  } catch( Exception e ) {
      out.println( "Error Retrieving Forecast: " + e.getMessage() );
  }
        out.flush();
        out.close();
View Full Code Here

TOP

Related Classes of org.sonatype.mavenbook.weather.WeatherService

Copyright © 2018 www.massapicom. 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.