Java VBScript JavaScript and session

Source: Internet
Author: User
1. Sessions in Java can be placed with classes, such as a userbean.

Everyone on Earth knows this.

2. VBScript cannot put a vbs class into the session

Try it if you don't believe it.

Other restrictions include:

When you store objectsSessionBefore using an object, you must know which thread model it uses. Only objects marked as "both" can be stored inSessionObject. For more information, seeCreate ASP Components"In"SelectThread Model".

If you store an array inSessionDo not directly change the elements stored in the array. For example, the following scripts cannot be run.

<% SESSION ("storedarray") (3) = "New Value" %>

This is becauseSessionObjects are implemented as collections. The array element storedarray (3) is not assigned a new value. This value will be included inApplicationAnd overwrite any information stored before this location.

3. Javascript is acceptable.

<%
// Server. Transfer ("frames. asp ");
VaR point = {
"X": 10,
"Y": 20
};
Session ("point") = point;

Response. Write ("<br/> point. x =" + SESSION ("point"). X );
Response. Write ("<br/> point. Y =" + SESSION ("point"). y );
%>

This is actually a good understanding. In JavaScript, "class" is also a data type.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.