1, scope implicit objects-built-in map implementation, setattribute, GetAttribute,
1, pagescope page scope pagecontext– stored content can only be valid within the current page scope
2, Requestscope request scope request– can only be valid within the same request, pay attention to a Web page click Refresh is a new request
3. The Sessionscope session scope (used to store all information about a user's session) session– and browser-related scopes, and a browser corresponds to a conversation. The browser does not close is a sessions, even if you open multiple tabs, is also a session. The Web page will timeout without doing anything. The following are configured in Web.xml:
<!--Configure Timeout management for the session, in minutes. A negative configuration is permanently valid-->
<session-config>
<session-timeout>30</session-timeout>
</ Session-config>
4, Applicationscope Application scope application– and application-related, equivalent to global static values. As long as the application does not restart, it is always available.
Example:
Session.setattribute ("username", "John");
String name = Session.getattribute ("username");
2. Web program development process
1, Database
2, based on database tables to generate related data access DAO and related entity class Bean
3, create related pages according to business