JSP - Forward action tag Last Updated : 23 Jul, 2025 Comments Improve Suggest changes Like Article Like Report JavaServer Pages in Java can provide a way to create dynamic web pages. Forward action tag is a tool in JSP that is used to forward control from one JSP page to another JSP by the same application. It allows developers to create modular and reusable components to build web applications. Forward action tag in the JSPForward action tag in JSP allows the client to forward a request from one JSP page to another without the browser. This approach is useful for modularizing web applications and split the tasks across multiple JSP pages. When the request is submitted, the URL in the browser does not change and the client is unaware of the server-side operation. Step-by-Step ImplementationCreate JSP pages: We can create multiple JSP pages representing different parts or concepts of a web application.Use Forward Action Tag: To refer to the target JSP page we can use the <jsp:forward> tag to which the control should be forwarded.Modify the request on the target page: We can execute the request sent to the target JSP page and then retrieve the request parameters or perform the necessary server-side operations.Display Output: Finally, create dynamic objects or display information based on submitted requests.Project to Implement JSP Forward action tagBelow we have created index.jsp and Tareget.jsp and tested the output in the browser. index.jsp: HTML <html> <head> <title>Forward Example</title> <style> body { font-family: Arial, sans-serif; background-color: #f2f2f2; padding: 20px; } h2 { color: #333; } p { color: #666; } </style> </head> <body> <h2>Welcome to the Forward Example</h2> <p>This is the index page.</p> <jsp:forward page="target.jsp"/> </body> </html> Target.jsp: HTML <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Target Page</title> <style> body { font-family: Arial, sans-serif; background-color: #f9f9f9; padding: 20px; text-align: center; } h2 { color: #333; } p { color: #666; } </style> </head> <body> <h2>Target Page</h2> <p>This is the target page.</p> </body> </html> Output:Below we can see the output in browser. When the users reach the index.jsp page, they will see the message "Target Page" with the paragraph "This is the target page." The <jsp: forward> tag in the index.jsp forwards the request to the target.jsp and the user see the contents target.jsp including the message of the target page. Create Quiz Comment M maheshkadambala Follow 0 Improve M maheshkadambala Follow 0 Improve Article Tags : Advance Java Java-JSP Explore Java Enterprise EditionIntroduction to Java Servlets4 min readLife Cycle of a Servlet4 min readIntroduction to JSP4 min readJSP Architecture2 min readJSF | Java Server Faces4 min readEnterprise Java Beans (EJB)4 min readMultithreadingJava Multithreading Tutorial3 min readJava Thread Class5 min readLifecycle and States of a Thread in Java5 min readJava Thread Priority in Multithreading3 min readMain thread in Java4 min readConcurrencyjava.util.concurrent Package9 min readJava.util.concurrent.Executor interface with Examples1 min readJava.util.concurrent.ExecutorService Interface with Examples3 min readJava Runnable Interface3 min readCallable vs Future in Java2 min readDifference Between Callable and Runnable in Java3 min readJDBC (Java Database Connectivity)JDBC (Java Database Connectivity)3 min readJDBC Drivers4 min readEstablishing JDBC Connection in Java5 min readTypes of Statements in JDBC4 min readJava FrameworksIntroduction to Spring Framework7 min readSpring - Understanding Inversion of Control with Example6 min readIntroduction to Spring Boot4 min readSpring - MVC Framework3 min readHow to Create a REST API using Java Spring Boot?4 min readWhat is Spring Data JPA?4 min readSpring - JDBC Template7 min readSpring Hibernate Configuration and Create a Table in Database4 min readAspect Oriented Programming (AOP) in Spring Framework3 min readIntroduction to Spring Security and its Features3 min readWhat is Spring Cloud3 min readIntroduction and Working of Struts Web Framework3 min readJUnitIntroduction to JUnit 57 min readJUnit 5 vs JUnit 42 min readHow to Write Test Cases in Java Application using Mockito and Junit?3 min readUnit Testing in Spring Boot Project using Mockito and Junit4 min readJUnit 5 - Test Suites with Example2 min readJUnit 5 â JaCoCo Code Coverage5 min read Like