Tomcat Study Notes (2)

2010-03-24  来源:本站原创  分类:Java  人气:321 

6.

<Manager className="some.manager.implementation.className"
                  customAttribute1="some custom value"
                  customAttribute2="some other custom value"/>

In the Tomcat in, Session management mainly through the method used, a custom managed Session of the Manager.
StandardManager
The default Manager. Only when the normal shutdown of the server will only serialization session to the hard drive.
PersistentManager
The article said that this was a pilot scheme. To achieve all of the Session serialization method. Store in accordance with its use of different. Can Seession instantiated to a local or databases.
Provided implementation class is org.apache.catalina.session.PersistentManager
The file system store is org.apache.catalina.session.FileStore file format is <session ID>. Session
DB's store is org.apache.catalina.session.JDBCStore

7. JDBC DataSources
Configuration file

<resource-ref>
          <description>
                The database DataSource for the Acme web application.
           </description>
           <res-ref-name>jdbc/JabaDotDB</res-ref-name>
           <res-type>javax.sql.DataSource</res-type>
            <res-auth>Container</res-auth>
       </resource-ref>
      <!-- Configure a JDBC DataSource for the user database. -->
     <Resource name="jdbc/JabaDotDB"
          type="javax.sql.DataSource"
          auth="Container"
          user="ian"
          password="top_secret_stuff"
          driverClassName="org.postgresql.Driver"
          url="jdbc:postgresql:jabadot"
          maxActive="8"
          maxIdle="4"/>

The use of specific

Context ctx = new InitialContext( );
          DataSource ds = (DataSource)
          ctx.lookup("java:comp/env/jdbc/JabaDotDB");
         Connection conn = ds.getConnection( );
      //  ... Java code that accesses the database ...
          conn.close( );

8 Custom User Directory

<Listener className="org.apache.catalina.startup.UserConfig"
            directoryName="public_html"
            userClass="org.apache.catalina.startup.PasswdUserDatabase"/>

Method 1, the directory will make / home / users / ian / public_html or / users / jbrittain / public_html.

<Listener className="org.apache.catalina.startup.UserConfig"
             directoryName="public_html"
            homeBase="/home"
            userClass="org.apache.catalina.startup.HomesUserDatabase"/>

Method 2
Will make its catalog / home / ian / public_html and / home / jbrittain / public_html.

相关文章
  • Tomcat Study Notes (1) 2010-03-18

    1. Multiple Tomcat instances To have one Tomcat distribution installed and run two or more Tomcat JVM instances that are configureddifferently, you must keep each JVM instance's files separate Read this sentence, the structure for the Tomcat was a li

  • Tomcat Study Notes (2) 2010-03-24

    6. <Manager className="some.manager.implementation.className" customAttribute1="some custom value" customAttribute2="some other custom value"/> In the Tomcat in, Session management mainly through the method used, a cust

  • Struts2 Study Notes 1 --- HelloWorld 2010-03-24

    Struts2 study notes first: environmental structures and the HelloWorld implementation. 1, build Struts2 environment. The Myeclipse years to create a new WEB projects, I named: Struts2_01. As the use of some Struts, libraries, and here I had a new use

  • EJB personal study notes 2010-05-30

    Ejb3.0 Study Notes ( Run in Jobss Ejb) What is EJB? Full name is Enterprice JavaBeans is a standard for distributed business applications server component model . Prepared using Enterprice JavaBeans architecture is extensible applications , Transacti

  • LifeRay Portal 6 Study Notes 3: Liferay IDE's installation 2010-07-27

    Liferay Portal 6 in 23 had a small version of the update, the current version is 6.04, is mainly a large number of bug fixes Download the following address: http://sourceforge.net/projects/lportal/files/Liferay% 20Portal/6.0.4 / Updated: http://issue

  • LifeRay Portal 6 Study Notes 5: Struts Portlet Development Example 2010-08-02

    This referred to Struts Portlet in Ext environment is developed using liferay bundles of Struts 1.2 Development Flowchart This article is based on the previous inside the Liferay IDE development environment to create the ext. Preparations 1, ext-web

  • blazeds study notes an overall understanding of 2010-08-19

    blazeds study notes an overall understanding of BlazeDS is a server-side communication service, it can make running in the browser's Adobe Flex applications with server-side Java service applications communicate with each other. The whole system incl

  • <How Tomcat Works> study notes (a) 2010-11-02

    Read the first three chapters of this book, written very well, indeed layman very thorough analysis of the tomcat. Although the book is about the tomcat "Starter Edition", but the content is not too small, the more code to the back more, and the

  • One study notes struts2 (PART 1. Struts2 Introduction and Configuration) 2011-01-05

    One study notes struts2 (PART 1. Struts2 Introduction and Configuration) First, the development environment IDE: MyEclipse6.0 version Servlet Container: Tomcat6.0 Second, create a web project Project Name: struts2 1, function: to complete a user logo

  • ROR Study Notes 1 2009-03-09

    Installed at the success of ROR environment (yes, I installed InstantRails-2.0-win), the first thing done is to create a simple DB demo, the steps are as follows: 1.Rails Appliction Medium Create New Rails App ... 2. Create Application Framework: rai

  • js Study Notes (3) 2009-03-16

    Dojo Study Notes (2. DjConfig explain) dojo are djConfig a built-in Global Settings object, its role is through its control of behavior dojo First of all, we need to quote the former dojo.js statement djConfig object in order to load when dojo.js be

  • hibernate-depth study notes 2009-07-28

    hibernate-depth study notes Keywords: hibernate o / r maping Hb just in the fire is abuse, seen, but not very ormaping understand that we are now looking to re-hb, before many areas are not Now suddenly have a lot about all the basic . Logo generator

  • Java IO study notes: Concepts and Principles 2010-03-29

    Java IO study notes: Concepts and Principles First, the concept of Java in the operation of the file is streaming manner. Flow is a set of Java in-memory ordered data sequence. Java data from the source (file, memory, keyboard, network) read into the

  • XSL Study Notes 1: XSL Overview 2010-03-29

    XSL Study Notes 1: XSL Overview In essence, XSL is a manifestation of XML technology, which is the main output is HTML page. XML document does not contain any formatting, to complete the XML conversion of documents to other formats should first consi

  • XSL Study Notes 2 XSLT template rules <xsl:template> and <xsl:apply-templates> 2010-03-29

    XSL Study Notes 2 XSLT template rules <xsl:template> and <xsl:apply-templates> XSL style sheet is by one or more known as the "template" set of rules formed. Each template contains a specific node with the matching of each applicatio

  • XSL Study Notes 3 XSLT template rules <xsl:value-of> and <xsl:for-each> 2010-03-29

    XSL Study Notes 3 XSLT template rules <xsl:value-of> and <xsl:for-each> 1, <xsl:value-of> element <xsl:value-of> element is to select the current node's value in the result tree is used to create a text node. For example, <xsl:v

  • XSL Study Notes 4 XSLT pattern matching syntax 2010-03-29

    XSL Study Notes 4 XSLT pattern matching syntax Template rule through the use of models to match the document tree nodes. Mode specifies a set of conditions, is used to select the node to deal with. Pattern matching syntax not only able to match the e

  • XSL Study Notes 5 mode attribute 2010-03-29

    XSL Study Notes 5 mode attribute An element of a deal to do several times, then select <xsl: apply-template element in treatment. If you want to deal with each element of the same output of a different result, then need to use the mode attribute. <x

  • XSL Study Notes 6 XSLT built-in template rules 2010-03-29

    XSL Study Notes 6 XSLT built-in template rules The definition of the correct template rules to match the XML tree node is the key to XSLT applications. In order for the source document tree nodes in the absence of a clear case of matching rules can b

  • XSL Study Notes 7 XSLT processing on the blank 2010-03-29

    XSL Study Notes 7 XSLT processing on the blank By default, XSLT processors, the source XML document element content of the blank is retained. In order to retain or remove the results of the document element of the source document in the blank, you ca