JSP Request

The request object is used to fetch the user's data from the browser and pass this data to the server. The working of JSP request object is similar to the servlet's HttpServletRequest interface object.

Example of JSP Request

In this example, request object fetches the form data.

index.html

Name :
Course:
 

index.jsp

<% String str1=request.getParameter("name"); 
String str2=request.getParameter("Course"); %>
  <%="Welcome "+str1%>
<%="Your course : "+str2 %>

Output:




Related Topics

JSP forward and include tag

In JSP, forward and include tags are the most frequently used action tags. Unlike Servlets, there is no need to create object of RequestDispatcher interface to use the functionality of...

1 minute read.

JSTL Formatting Tags

In JSTL, the role of formatting tag is to specify the type of format that represents date and time. The following syntax represent the URL of formatting tag: - <%@ taglib...

1 minute read.

JSP Life Cycle

JSP life cycle The life cycle of JSP page internally implemented as a Servlet. These are the following stages through which a JSP page has to pass: Translation – This is an...

2 minutes read.

JSP Custom Tag

JSP custom tag provides flexibility to programmers, to declare their own tag. Thus, a user-defined tag can be created through custom tags to perform various operations. These custom tags behave as...

2 minutes read.

JSP pageContext

The object pageContext is used to access all the information of JSP page. It is an instance of javax.servlet.jsp.PageContext. The scope of pageContext can be defined explicitly. The object is valid...

2 minutes read.

Scripting in JSP

JSP scripting provides an easy and efficient way to insert Java programming language in JSP pages. Here, Java is a default language. JSP also allows you to use any other...

1 minute read.

JSP Include Directive

As the name implies, include directive is used to include the content of other files such as HTML, JSP, text into the current JSP page. These files are included during...

1 minute read.

JSP Comments

JSP provides separate tag for comment section. The content inside these tag is completely ignored by JSP engine.    The syntax of comment tag is mentioned below. <%-- This is a comment...

1 minute read.

JSP Page Directive

JSP page directive provides various attributes with unique properties. These attributes can be applied to an entire JSP page. The syntax of Page directive is as follows: - <@page attribute="value"> Page directive...

3 minutes read.

JSP Taglib Directive

Taglib directive is used to define tag libraries in JSP page. It enables user to use custom tags within JSP file. A JSP page can contains more than one taglib...

1 minute read.

JSP EL Implicit Objects

Apart from operators, JSP also provide expression language implicit objects. The role of these implicit objects is to get the attribute associated with various object. Here, is the list of...

1 minute read.

JSP response

Basically, JSP response object is an instance of servlet's HttpServletResponse interface. It is used to resolve client request. Response object can be used to perform various functions such as encode...

1 minute read.

JSP Request

The request object is used to fetch the user's data from the browser and pass this data to the server. The working of JSP request object is similar to the...

1 minute read.

JSP Directives

In JSP, the role of directive is to provide directions to the JSP container regarding the compilation of JSP page. Directives convey information from JSP page to container that give...

1 minute read.

JSP Tutorial

Java Server Pages (JSP) is a server-side technology used to create static and dynamic web applications. The static content is expressed by text-based format files such as HTML, XML, SVG...

2 minutes read.

JSP Cookie Handling

Cookie is a small piece of information sent by server to recognize the user. This information is stored at client side in the textual form. In JSP, cookie is an object...

1 minute read.

JSP application

JSP application object is an instance of servlet's ServletContext interface. It is used initialize parameter of one or more JSP pages in an application. Thus, the scope of application object...

1 minute read.

JSP Declaration Tag

JSP declaration tag is used to declare variables and methods in JSP page. Unlike scriptlet tag, JSP container placed the content of declaration tag outside the jspService() method. So, variables...

1 minute read.

JSP config

JSP config object is used to send the configuration information to JSP page. Here, config is an instance of servlet's ServletConfig interface. In this case, the information is send to...

1 minute read.

JSP out

In JSP, out is an implicit object that is associated with the response object. This object is used to write content to the output stream. Methods of JSP out Following are...

1 minute read.