Note: The code need to be placed in a filesharing location for us to access instead of emailing. The code requires Maven build script. The coding can be done in Spring Tool Suite or any eclipse based IDE.
CodingChallenge 1 – Weather Information
Everybody is curious about Weather around the world. For this coding challenge we would like the tester to create a single page which allows a user to enter a zip code or city and retrieve and display the current weather info.
Here are the criteria:
- Create a web application using Spring MVC and deploy to Tomcat
- Create a single jsp page which has a single input field and a submit button
- Make use of regular expression to validate that the zip code(s) is valid using JavaScript
- On submit validate that the input field is not empty using jQuery
- On submit do an AJAX post using jQuery to the server
- On the server use CXF or Spring Webservices to call this webservice GetCityWeatherByZIP
([login to view URL]) and return the weather information
- Display the weather information on the page
- Use log4j and make use of some of the different logging levels
- Add a Restful web service to Spring MVC controller so that by passing the zip code as url parameter will return the weather information
- Make use of spring internationalization (it could be only for one language, English)
Bonus:
- Allow multiple comma separated zips to be shown and returned
- Make use of JQuery animations to make the UI more elegant