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.
- 🌤️ 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
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
- Backend: Java, JSP (JavaServer Pages)
- Frontend: HTML, CSS
- Database: SQL
- Build: WAR deployment
- 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)
-
Clone the repository:
git clone https://github.com/imriadh/WeatherApp.git cd WeatherApp -
Configure API Key:
- Navigate to
src/main/webapp/WEB-INF/ - Copy
config.properties.exampletoconfig.properties - Open
config.propertiesand replaceYOUR_API_KEY_HEREwith your actual OpenWeatherMap API key:
openweather.api.key=your_actual_api_key_here - Navigate to
-
Set up the database:
- Create a new database
- Execute the SQL script located at
src/main/webapp/db/weather.db.sql
-
Configure database connection:
- Update the database credentials in
src/main/webapp/db/DBConnection.jsp
- Update the database credentials in
-
Deploy the application:
- Copy
WeatherApp.warto your Tomcatwebappsdirectory, or - Deploy through your IDE or servlet container
- Copy
-
Access the application:
- Open your browser and navigate to
http://localhost:8080/WeatherApp
- Open your browser and navigate to
- Register: Create a new account using the registration page
- Login: Sign in with your credentials
- Search Weather: Enter a location to get current weather information
- View History: Check your weather search history
- Dashboard: Access your personalized dashboard
/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
This project is licensed under the MIT License - see the LICENSE file for details.
imriadh
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
- Weather data provided by [Weather API Service]
- Built as a learning project for Java web development



