This is a project made for teaching about Web Services and custom Taglibs in java. We're using the OpenWeatherAPI for lookup the current weather for a location. It uses XML for represent the current weather, and we use JAXP for parsing. Then, we made a custom taglib to include it on JSP files.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
nbproject
src
web
.gitignore
README.md
build.xml

README.md

WeatherWidget

About

This is a project made for teaching about Web Services and custom Taglibs in java. We're using the OpenWeatherAPI for lookup the current weather for a location. It uses XML for represent the current weather, and we use JAXP for parsing. Then, we made a custom taglib to include it on JSP files.

screenshot

Using

To use the taglib, include the prefix ont he JSP:

<%@taglib prefix="weather" uri="/WEB-INF/tlds/weather.tld" %>

Then use the taglib like this:

<weather:Current city="SaoPaulo" appid=""/>

The attributes are:

  • appid (reuired) - The app id (get it on http://openweathermap.org/)
  • city (required) - city name (use ISO 3166 country codes)
  • unit - metric for temperature (optional):
    • kelvin
    • metric (Celsius)
    • imperial (Fahrenheit)