Skip to content

A simple Weather Application built using Java JSP, OpenWeather API, and Oracle 21c Database. Fetches real-time weather data and stores query history.

License

Notifications You must be signed in to change notification settings

imriadh/WeatherApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WeatherApp

A web-based weather application built with Java and JSP that allows users to search for weather information, view weather history, and manage their accounts.

Screenshots

Home Page

Weather App Dashboard

Create Account

Create Account

Weather Search

Weather Search

Weather History

Weather History

Features

  • 🌤️ Weather Search: Search for current weather conditions by location
  • 📊 Weather History: View historical weather data
  • 👤 User Authentication: Register and login functionality
  • 📱 Dashboard: Personalized user dashboard
  • 🎨 Responsive Design: Clean and modern user interface

Project Structure

WeatherApp/
├── src/
│   └── main/
│       ├── java/              # Java source files
│       └── webapp/
│           ├── auth/          # Authentication pages (login, register, logout)
│           ├── weather/       # Weather-related pages (search, results, history)
│           ├── css/           # Stylesheets
│           ├── js/            # JavaScript files
│           ├── db/            # Database connection and SQL files
│           ├── WEB-INF/       # Web application configuration
│           └── META-INF/      # Manifest files
├── build/                     # Compiled classes
└── WeatherApp.war            # Deployable WAR file

Technologies Used

  • Backend: Java, JSP (JavaServer Pages)
  • Frontend: HTML, CSS
  • Database: SQL
  • Build: WAR deployment

Getting Started

Prerequisites

  • Java Development Kit (JDK) 8 or higher
  • Apache Tomcat or similar servlet container
  • MySQL or compatible database server
  • OpenWeatherMap API key (free at https://openweathermap.org/api)

Installation

  1. Clone the repository:

    git clone https://github.com/imriadh/WeatherApp.git
    cd WeatherApp
  2. Configure API Key:

    • Navigate to src/main/webapp/WEB-INF/
    • Copy config.properties.example to config.properties
    • Open config.properties and replace YOUR_API_KEY_HERE with your actual OpenWeatherMap API key:
    openweather.api.key=your_actual_api_key_here
  3. Set up the database:

    • Create a new database
    • Execute the SQL script located at src/main/webapp/db/weather.db.sql
  4. Configure database connection:

    • Update the database credentials in src/main/webapp/db/DBConnection.jsp
  5. Deploy the application:

    • Copy WeatherApp.war to your Tomcat webapps directory, or
    • Deploy through your IDE or servlet container
  6. Access the application:

    • Open your browser and navigate to http://localhost:8080/WeatherApp

Usage

  1. Register: Create a new account using the registration page
  2. Login: Sign in with your credentials
  3. Search Weather: Enter a location to get current weather information
  4. View History: Check your weather search history
  5. Dashboard: Access your personalized dashboard

Pages

  • /index.jsp - Home page
  • /auth/login.jsp - User login
  • /auth/register.jsp - User registration
  • /auth/logout.jsp - Logout functionality
  • /dashboard.jsp - User dashboard
  • /weather/search.jsp - Weather search
  • /weather/results.jsp - Weather results
  • /weather/history.jsp - Weather history

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

imriadh

Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

Acknowledgments

  • Weather data provided by [Weather API Service]
  • Built as a learning project for Java web development

About

A simple Weather Application built using Java JSP, OpenWeather API, and Oracle 21c Database. Fetches real-time weather data and stores query history.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published