answersLogoWhite

0

What is session in jsp?

Updated: 8/17/2019
User Avatar

Wiki User

14y ago

Best Answer

Session in the JSP and Servlet context refers to an instance of the HttpSession object that contains all the information about the current user session with the web application. This can be used as a cache or temporary storage area to store values that might be required across the application.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is session in jsp?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you set the session variables in jsp?

The session variables can be accessed in a jsp page from the request object. Note: Accessing session contents in JSP is not a good design practice


Can I prevent the creation of a session in a JSP page?

Yes you can. Use the below line in your JSP page to accomplish it. <%@ page session="false" %>


Which method invalidate session of a jsp page?

session.invalidate()


Session tracking in servlet?

Each web application contains a Session that can contain data that can be commonly made available to all the parts of the web application. The Session can be accessed from both the JSP and the Servlet. Ex: The servlet contains references to the HttpRequest object. So to access the session you can do so as below: HttpSession session = request.getSession();


What is JSP Implicit objects?

In any JSP Page, there are a bunch of implicit objects that are available for the programmer to use. It contains a variety of information that can be used to display stuff on the page. The following JSP Implicit Objects are available for a programmer: • request • response • out • session • config • application • page • pageContext


What are the built in objects in jsp?

The correct term is "JSP Implicit Objects" In any JSP Page, there are a bunch of implicit objects that are available for the programmer to use. It contains a variety of information that can be used to display stuff on the page. The following JSP Implicit Objects that are available for a programmer. • request • response • out • session • config • application • page • pageContext


What are jsp actions?

JSP actions are XML tags that direct the server to use existing components or control the behavior of the JSP engine. JSP Actions consist of a typical (XML-based) prefix of "jsp" followed by a colon, followed by the action name followed by one or more attribute parameters. There are six JSP Actions: < jsp : include / > < jsp : forward / > < jsp : plugin / > < jsp : usebean / > < jsp : setProperty / > < jsp : getProperty / >


Set and get session attributes syntax in servlets and java script?

Setting and getting session attributes is fairly easy. It is the same in both Servlets and JSPs with one exception. In a JSP, you already have access to the session object, and you do not have to declare it. In a Servlet, you must get the session like this: javax.servlet.http.HttpSession session = request.getSession(); Once you have done that, you can set a session object like this: session.setAttribute("name","value"); To retrieve the value, do this: String foo = (String) session.getAttribute("name"); A couple of things to keep in mind: * The second parameter in the setAttribute method is an Object, not a String. When you retrieve the value, you have to cast it. In the example above, I am casting it to a String. * If you try to perform a getAttribute on a session attribute that does not exist, or was not set, it will return a null. * Session attributes are not available using JavaScript. You can not set or get an attribute in JavaScript. * You do NOT need to do the 'session = request.getSession() in a JSP. It is only necessary in a Servlet.


What is acronym of jsp?

JSP stands for Java Server Pages


What is full from JSP?

JSP stands for Java Server Pages


When was JSP Records created?

JSP Records was created in 1978.


How to Update data from jsp into database?

can i get update coding in jsp??