archive-cr.com » CR » L » LLOBET.CO.CR

Total: 247

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".
  • Apache Tomcat 8 (8.0.24) - MBean Descriptor How To
    Advanced IO 26 Additional Components 27 Mavenized 28 Security Considerations 29 Windows Service 30 Windows Authentication 31 Tomcat s JDBC Pool 32 WebSocket 33 Rewrite Reference Release Notes Configuration Tomcat Javadocs Servlet Javadocs JSP 2 3 Javadocs EL 3 0 Javadocs WebSocket 1 1 Javadocs JK 1 2 Documentation Apache Tomcat Development Building Changelog Status Developers Architecture Functional Specs Tribes MBean Descriptor How To Table of Contents Introduction Adding MBean descriptions Introduction Tomcat uses JMX MBeans as the technology for implementing manageability of Tomcat The descriptions of JMX MBeans for Catalina are in the mbeans descriptor xml file in each package You will need to add MBean descriptions for your custom components in order to avoid a ManagedBean is not found exception Adding MBean descriptions You may also add MBean descriptions for custom components in a mbeans descriptor xml file located in the same package as the class files it describes mbean name LDAPRealm className org apache catalina mbeans ClassNameMBean description Custom LDAPRealm domain Catalina group Realm type com myfirm mypackage LDAPRealm attribute name className description Fully qualified class name of the managed object type java lang String writeable false attribute name debug description The debugging detail level for this

    Original URL path: http://www.llobet.co.cr/docs/mbeans-descriptor-howto.html (2015-10-31)
    Open archived version from archive


  • Apache Tomcat 8 (8.0.24) - Default Servlet Reference
    located alongside the original file Tomcat will serve the gzipped file if the user agent supports gzip and this option is enabled false The file with the gz extension will be accessible if requested directly so if the original resource is protected with a security constraint the gzipped version must be similarly protected readmeFile If a directory listing is presented a readme file may also be presented with the listing This file is inserted as is so it may contain HTML globalXsltFile If you wish to customize your directory listing you can use an XSL transformation This value is a relative file name to either CATALINA BASE conf or CATALINA HOME conf which will be used for all directory listings This can be overridden per context and or per directory See contextXsltFile and localXsltFile below The format of the xml is shown below contextXsltFile You may also customize your directory listing by context by configuring contextXsltFile This must be a context relative path e g path to context xslt to a file with a xsl or xslt extension This overrides globalXsltFile If this value is present but a file does not exist then globalXsltFile will be used If globalXsltFile does not exist then the default directory listing will be shown localXsltFile You may also customize your directory listing by directory by configuring localXsltFile This must be a file in the directory where the listing will take place to with a xsl or xslt extension This overrides globalXsltFile and contextXsltFile If this value is present but a file does not exist then contextXsltFile will be used If contextXsltFile does not exist then globalXsltFile will be used If globalXsltFile does not exist then the default directory listing will be shown input Input buffer size in bytes when reading resources to be served 2048 output Output buffer size in bytes when writing resources to be served 2048 readonly Is this context read only so HTTP commands like PUT and DELETE are rejected true fileEncoding File encoding to be used when reading static resources platform default sendfileSize If the connector used supports sendfile this represents the minimal file size in KB for which sendfile will be used Use a negative value to always disable sendfile 48 useAcceptRanges If true the Accept Ranges header will be set when appropriate for the response true showServerInfo Should server information be presented in the response sent to clients when directory listing is enabled true How do I customize directory listings You can override DefaultServlet with you own implementation and use that in your web xml declaration If you can understand what was just said we will assume you can read the code to DefaultServlet servlet and make the appropriate adjustments If not then that method isn t for you You can use either localXsltFile or globalXsltFile and DefaultServlet will create an xml document and run it through an xsl transformation based on the values provided in localXsltFile and globalXsltFile localXsltFile is first checked followed by globalXsltFile then default

    Original URL path: http://www.llobet.co.cr/docs/default-servlet.html (2015-10-31)
    Open archived version from archive

  • Apache Tomcat 8 (8.0.24) - Load Balancer HOW-TO
    18 Clustering 19 Load Balancer 20 Connectors 21 Monitoring and Management 22 Logging 23 APR Native 24 Virtual Hosting 25 Advanced IO 26 Additional Components 27 Mavenized 28 Security Considerations 29 Windows Service 30 Windows Authentication 31 Tomcat s JDBC Pool 32 WebSocket 33 Rewrite Reference Release Notes Configuration Tomcat Javadocs Servlet Javadocs JSP 2 3 Javadocs EL 3 0 Javadocs WebSocket 1 1 Javadocs JK 1 2 Documentation Apache Tomcat Development Building Changelog Status Developers Architecture Functional Specs Tribes Load Balancer HOW TO Table of Contents Using the JK 1 2 x native connector Using Apache HTTP Server 2 x with mod proxy Using the JK 1 2 x native connector Please refer to the JK 1 2 x documentation Using Apache HTTP Server 2 x with mod proxy Please refer to the mod proxy documentation for Apache HTTP Server 2 2 This supports either HTTP or AJP load balancing This new version of mod proxy is also usable with Apache HTTP Server 2 0 but mod proxy will have to be compiled separately using the code from Apache HTTP Server 2 2 Comments Notice This comments section collects your suggestions on improving documentation for Apache Tomcat If you

    Original URL path: http://www.llobet.co.cr/docs/balancer-howto.html (2015-10-31)
    Open archived version from archive

  • Apache Tomcat 8 (8.0.24) - Connectors How To
    JDBC Pool 32 WebSocket 33 Rewrite Reference Release Notes Configuration Tomcat Javadocs Servlet Javadocs JSP 2 3 Javadocs EL 3 0 Javadocs WebSocket 1 1 Javadocs JK 1 2 Documentation Apache Tomcat Development Building Changelog Status Developers Architecture Functional Specs Tribes Connectors How To Table of Contents Introduction HTTP AJP Introduction Choosing a connector to use with Tomcat can be difficult This page will list the connectors which are supported with this Tomcat release and will hopefully help you make the right choice according to your needs HTTP The HTTP connector is setup by default with Tomcat and is ready to use This connector features the lowest latency and best overall performance For clustering a HTTP load balancer with support for web sessions stickiness must be installed to direct the traffic to the Tomcat servers Tomcat supports mod proxy on Apache HTTP Server 2 x and included by default in Apache HTTP Server 2 2 as the load balancer It should be noted that the performance of HTTP proxying is usually lower than the performance of AJP so AJP clustering is often preferable AJP When using a single server the performance when using a native webserver in front of the Tomcat instance is most of the time significantly worse than a standalone Tomcat with its default HTTP connector even if a large part of the web application is made of static files If integration with the native webserver is needed for any reason an AJP connector will provide faster performance than proxied HTTP AJP clustering is the most efficient from the Tomcat perspective It is otherwise functionally equivalent to HTTP clustering The native connectors supported with this Tomcat release are JK 1 2 x with any of the supported servers mod proxy on Apache HTTP Server 2 x included by

    Original URL path: http://www.llobet.co.cr/docs/connectors.html (2015-10-31)
    Open archived version from archive

  • Apache Tomcat 8 (8.0.24) - Monitoring and Managing Tomcat
    host Set the host shortcut the very long URL syntax localhost port Set the remote connection port 8050 username remote JMX connection user name password remote JMX connection password ref Name of the internal connection reference With this attribute you can configure more the one connection inside the same Ant project jmx server echo Echo the command usage for access analysis or debugging false if Only execute if a property of the given name exists in the current project unless Only execute if a property of the given name not exists in the current project Example to open a new JMX connection jmx open host jmx server name port jmx server port Example to open a JMX connection from URL with authorization and store at other reference jmx open url service jmx rmi jndi rmi localhost 9024 jmxrmi ref jmx server 9024 username controlRole password tomcat Example to open a JMX connection from URL with authorization and store at other reference but only when property jmx if exists and jmx unless not exists jmx open url service jmx rmi jndi rmi localhost 9024 jmxrmi ref jmx server 9024 username controlRole password tomcat if jmx if unless jmx unless Note All properties from jmxOpen task also exists at all other tasks and conditions JMXAccessorGetTask get attribute value Ant task List of Attributes Attribute Description Default value name Full qualified JMX ObjectName Catalina type Server attribute Existing MBean attribute see Tomcat MBean description above ref JMX Connection reference jmx server echo Echo command usage access and result false resultproperty Save result at this project property delimiter Split result with delimiter java util StringTokenizier and use resultproperty as prefix to store tokens separatearrayresults When return value is an array save result as property list resultproperty 0 N and resultproperty length true Example to get remote MBean attribute from default JMX connection jmx get name Catalina type Manager context servlets examples host localhost attribute maxActiveSessions resultproperty servlets examples maxActiveSessions Example to get and result array and split it at separate properties jmx get name Catalina type ClusterSender host localhost attribute senderObjectNames resultproperty senderObjectNames Access the senderObjectNames properties with senderObjectNames length give the number of returned sender list senderObjectNames 0 N found all sender object names Example to get IDataSender attribute connected only when cluster is configured Note The name attribute value was wrapped here to be more readable It has to be all on the same line without spaces jmx query failonerror false name Catalina type Cluster host tomcat application host resultproperty cluster jmx get name Catalina type IDataSender host tomcat application host senderAddress cluster backup address senderPort cluster backup port attribute connected resultproperty datasender connected if cluster 0 name JMXAccessorSetTask set attribute value Ant task List of Attributes Attribute Description Default value name Full qualified JMX ObjectName Catalina type Server attribute Existing MBean attribute see Tomcat MBean description above value value that set to attribute type type of the attribute java lang String ref JMX Connection reference jmx server echo Echo command usage access and result false Example to set remote MBean attribute value jmx set name Catalina type Manager context servlets examples host localhost attribute maxActiveSessions value 500 type int JMXAccessorInvokeTask invoke MBean operation Ant task List of Attributes Attribute Description Default value name Full qualified JMX ObjectName Catalina type Server operation Existing MBean operation see Tomcat funcspecs fs admin opers html ref JMX Connection reference jmx server echo Echo command usage access and result false resultproperty Save result at this project property delimiter Split result with delimiter java util StringTokenizier and use resultproperty as prefix to store tokens separatearrayresults When return value is an array save result as property list resultproperty 0 N and resultproperty length true stop an application jmx invoke name Catalina type Manager context servlets examples host localhost operation stop Now you can find the sessionid at sessions 0 N properties and access the count with sessions length property Example to get all sessionids jmx invoke name Catalina type Manager context servlets examples host localhost operation listSessionIds resultproperty sessions delimiter Now you can find the sessionid at sessions 0 N properties and access the count with sessions length property Example to get remote MBean session attribute from session sessionid 0 jmx invoke name Catalina type Manager context ClusterTest host localhost operation getSessionAttribute resultproperty hello arg value sessionid 0 arg value Hello jmx invoke Example to create a new access logger valve at vhost localhost jmx invoke name Catalina type MBeanFactory operation createAccessLoggerValve resultproperty accessLoggerObjectName arg value Catalina type Host host localhost jmx invoke Now you can find new MBean with name stored at accessLoggerObjectName property JMXAccessorQueryTask query MBean Ant task List of Attributes Attribute Description Default value name JMX ObjectName query string Catalina type Manager ref JMX Connection reference jmx server echo Echo command usage access and result false resultproperty Prefix project property name to all founded MBeans mbeans 0 N objectname attributebinduing bind ALL MBean attributes in addition to name false delimiter Split result with delimiter java util StringTokenizier and use resultproperty as prefix to store tokens separatearrayresults When return value is an array save result as property list resultproperty 0 N and resultproperty length true Get all Manager ObjectNames from all services and Hosts jmx query name Catalina type Manager resultproperty manager Now you can find the Session Manager at manager 0 N name properties and access the result object counter with manager length property Example to get the Manager from servlet examples application an bind all MBean properties jmx query name Catalina type Manager context servlet examples host localhost attributebinding true resultproperty manager servletExamples Now you can find the manager at manager servletExamples 0 name property and can access all properties from this manager with manager servletExamples 0 manager attribute names The result object counter from MBeans is stored ad manager length property Example to get all MBeans from a server and store inside an external XML property file project name jmx query xmlns jmx antlib org apache catalina ant jmx default query all basedir

    Original URL path: http://www.llobet.co.cr/docs/monitoring.html (2015-10-31)
    Open archived version from archive

  • Apache Tomcat 8 (8.0.24) - Logging in Tomcat
    per classloader configuration in addition to the regular global java util logging configuration This means that logging can be configured at the following layers Globally That is usually done in the catalina base conf logging properties file The file is specified by the java util logging config file System property which is set by the startup scripts If it is not readable or is not configured the default is to use the java home lib logging properties file in the JRE In the web application The file will be WEB INF classes logging properties The default logging properties in the JRE specifies a ConsoleHandler that routes logging to System err The default conf logging properties in Apache Tomcat also adds several FileHandler s that write to files A handler s log level threshold is INFO by default and can be set using SEVERE WARNING INFO CONFIG FINE FINER FINEST or ALL You can also target specific packages to collect logging from and specify a level To enable debug logging for part of Tomcat s internals you should configure both the appropriate logger s and the appropriate handler s to use the FINEST or ALL level e g org apache catalina session level ALL java util logging ConsoleHandler level ALL When enabling debug logging it is recommended that it is enabled for the narrowest possible scope as debug logging can generate large amounts of information The configuration used by JULI is the same as the one supported by plain java util logging but uses a few extensions to allow better flexibility in configuring loggers and handlers The main differences are A prefix may be added to handler names so that multiple handlers of a single class may be instantiated A prefix is a String which starts with a digit and ends with For example 22foobar is a valid prefix System property replacement is performed for property values which contain systemPropertyName If using a class loader that implements the org apache juli WebappProperties interface Tomcat s web application class loader does then property replacement is also performed for classloader webappName classloader hostName and classloader serviceName which are replaced with the web application name the host name and the service name respectively By default loggers will not delegate to their parent if they have associated handlers This may be changed per logger using the loggerName useParentHandlers property which accepts a boolean value The root logger can define its set of handlers using the handlers property There are several additional implementation classes that can be used together with the ones provided by Java The notable one is org apache juli FileHandler org apache juli FileHandler supports buffering of the logs The buffering is not enabled by default To configure it use the bufferSize property of a handler The value of 0 uses system default buffering typically an 8K buffer will be used A value of 0 forces a writer flush upon each log write A value 0 uses a BufferedOutputStream with the defined value but note that the system default buffering will also be applied Example logging properties file to be placed in CATALINA BASE conf handlers 1catalina org apache juli FileHandler 2localhost org apache juli FileHandler 3manager org apache juli FileHandler java util logging ConsoleHandler handlers 1catalina org apache juli FileHandler java util logging ConsoleHandler Handler specific properties Describes specific configuration info for Handlers 1catalina org apache juli FileHandler level FINE 1catalina org apache juli FileHandler directory catalina base logs 1catalina org apache juli FileHandler prefix catalina 2localhost org apache juli FileHandler level FINE 2localhost org apache juli FileHandler directory catalina base logs 2localhost org apache juli FileHandler prefix localhost 3manager org apache juli FileHandler level FINE 3manager org apache juli FileHandler directory catalina base logs 3manager org apache juli FileHandler prefix manager 3manager org apache juli FileHandler bufferSize 16384 java util logging ConsoleHandler level FINE java util logging ConsoleHandler formatter java util logging SimpleFormatter Facility specific properties Provides extra control for each logger org apache catalina core ContainerBase Catalina localhost level INFO org apache catalina core ContainerBase Catalina localhost handlers 2localhost org apache juli FileHandler org apache catalina core ContainerBase Catalina localhost manager level INFO org apache catalina core ContainerBase Catalina localhost manager handlers 3manager org apache juli FileHandler For example set the org apache catalina util LifecycleBase logger to log each component that extends LifecycleBase changing state org apache catalina util LifecycleBase level FINE Example logging properties for the servlet examples web application to be placed in WEB INF classes inside the web application handlers org apache juli FileHandler java util logging ConsoleHandler Handler specific properties Describes specific configuration info for Handlers org apache juli FileHandler level FINE org apache juli FileHandler directory catalina base logs org apache juli FileHandler prefix classloader webappName java util logging ConsoleHandler level FINE java util logging ConsoleHandler formatter java util logging SimpleFormatter Documentation references See the following resources for additional information Apache Tomcat Javadoc for the org apache juli package Oracle Java 6 Javadoc for the java util logging package Considerations for production usage You may want to take note of the following Consider removing ConsoleHandler from configuration By default thanks to the handlers setting logging goes both to a FileHandler and to a ConsoleHandler The output of the latter one is usually captured into a file such as catalina out Thus you end up with two copies of the same messages Consider removing FileHandler s for the applications that you do not use E g the one for host manager The handlers by default use the system default encoding to write the log files It can be configured with encoding property See Javadoc for details Consider configuring an Access log Using Log4j This section explains how to configure Tomcat to use log4j rather than java util logging for all Tomcat s internal logging Note The steps described in this section are needed when you want to reconfigure Tomcat to use Apache log4j for its own logging These steps are not needed if you just

    Original URL path: http://www.llobet.co.cr/docs/logging.html (2015-10-31)
    Open archived version from archive

  • Apache Tomcat 8 (8.0.24) - Apache Portable Runtime (APR) based Native library for Tomcat
    Java much more viable as a full fledged webserver platform rather than simply a backend focused technology Installation APR support requires three main native components to be installed APR library JNI wrappers for APR used by Tomcat libtcnative OpenSSL libraries Windows Windows binaries are provided for tcnative 1 which is a statically compiled dll which includes OpenSSL and APR It can be downloaded from here as 32bit or AMD x86 64 binaries In security conscious production environments it is recommended to use separate shared dlls for OpenSSL APR and libtcnative 1 and update them as needed according to security bulletins Windows OpenSSL binaries are linked from the Official OpenSSL website see related binaries Linux Most Linux distributions will ship packages for APR and OpenSSL The JNI wrapper libtcnative will then have to be compiled It depends on APR OpenSSL and the Java headers Requirements APR 1 2 development headers libapr1 dev package OpenSSL 0 9 7 development headers libssl dev package JNI headers from Java compatible JDK 1 4 GNU development environment gcc make The wrapper library sources are located in the Tomcat binary bundle in the bin tomcat native tar gz archive Once the build environment is installed and the source archive is extracted the wrapper library can be compiled using from the folder containing the configure script configure make make install APR Components Once the libraries are properly installed and available to Java if loading fails the library path will be displayed the Tomcat connectors will automatically use APR Configuration of the connectors is similar to the regular connectors but have a few extra attributes which are used to configure APR components Note that the defaults should be well tuned for most use cases and additional tweaking shouldn t be required When APR is enabled the following features

    Original URL path: http://www.llobet.co.cr/docs/apr.html (2015-10-31)
    Open archived version from archive

  • Apache Tomcat 8 (8.0.24) - Virtual Hosting and Tomcat
    approach 2 Further Information Assumptions For the sake of this how to assume you have a development host with two host names ren and stimpy Let s also assume one instance of Tomcat running so CATALINA HOME refers to wherever it s installed perhaps usr local tomcat Also this how to uses Unix style path separators and commands if you re on Windows modify accordingly server xml At the simplest edit the Engine portion of your server xml file to look like this Engine name Catalina defaultHost ren Host name ren appBase renapps Host name stimpy appBase stimpyapps Engine Note that the directory structures under the appBase for each host should not overlap each other Consult the configuration documentation for other attributes of the Engine and Host elements Webapps Directory Create directories for each of the virtual hosts mkdir CATALINA HOME renapps mkdir CATALINA HOME stimpyapps Configuring Your Contexts General Contexts are normally located underneath the appBase directory For example to deploy the foobar context as a war file in the ren host use CATALINA HOME renapps foobar war Note that the default or ROOT context for ren would be deployed as CATALINA HOME renapps ROOT war WAR or CATALINA HOME renapps ROOT directory NOTE The docBase for a context should never be the same as the appBase for a host context xml approach 1 Within your Context create a META INF directory and then place your Context definition in it in a file named context xml i e CATALINA HOME renapps ROOT META INF context xml This makes deployment easier particularly if you re distributing a WAR file context xml approach 2 Create a structure under CATALINA HOME conf Catalina corresponding to your virtual hosts e g mkdir CATALINA HOME conf Catalina ren mkdir CATALINA HOME conf Catalina stimpy

    Original URL path: http://www.llobet.co.cr/docs/virtual-hosting-howto.html (2015-10-31)
    Open archived version from archive



  •