Server and browser sessions

Source: Internet
Author: User
Tags relative sessions
Server | browser

For cookies: Cookies cannot be shared in different applications (for projects under the Web or application, that is, a module). Therefore, you need to set path for cookies when using, to specify the URL of the specific request.
For cookies, the settings are usually set directly on the domain and only relative paths are specified (as standard for the directory where the cookies are set). You do not need to specify a port (no matter what port you are accessing).
When a cookie is set, its validity period is 1 if the expiration is not set, which means that the cookie is not valid when the browser is closed. But such a tower is meant to exist in a cache, not to write a cookie folder inside
And for the session, different applications can not share the session! For example: Jsp:forward can only take a relative path, so it can only be shared in the same application. In the same application, even Response.Redirect can be shared seesion!
For the WebLogic Server special cluster scenario, you might need to configure the Weblogic.xml file for the following example:
<?xml version= "1.0" encoding= "UTF-8"?>
<! DOCTYPE Weblogic-web-app Public "-//bea Systems, INC.//DTD Web Application 8.1//en" "http://www.bea.com/servers/wls810/ Dtd/weblogic810-web-jar.dtd ">
<weblogic-web-app>
<session-descriptor>
<session-param>
<param-name>
CookieName
</param-name>
<param-value>
Username
</param-value>
</session-param>
<session-param>
<param-name>
CookieName
</param-name>
<param-value>
Pervlige
</param-value>
</session-param>
<session-param>
<param-name>
Cookiesenabled
</param-name>
<param-value>
True
</param-value>
</session-param>
<session-param>
<param-name>
Cookiepath
</param-name>
<param-value>
Http://59.64.76.16:7001/DLManagementConsoleWeb
</param-value>
</session-param>
</session-descriptor>


<jsp-descriptor>
<jsp-param>
<param-name>debug</param-name>
<param-value>true</param-value>
</jsp-param>
</jsp-descriptor>

</weblogic-web-app>

Note: In the JSP can not directly call the class static method, he could not call the object! He must declare the object before calling the static method!



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.