archive-es.com » ES » E » EPPA.ES

Total: 100

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

Or switch to "Titles and links view".
  • Apache Tomcat 7 (7.0.22) - Default Servlet Reference
    DefaultServlet allows the following initParamters debug Debugging level It is not very useful unless you are a tomcat developer As of this writing useful values are 0 1 11 1000 0 listings If no welcome file is present can a directory listing be shown value may be true or false false Welcome files are part of the servlet api WARNING Listings of directories containing many entries are expensive Multiple requests for large directory listings can consume significant proportions of server resources 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 an absolute file name which 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 should be a context relative path e g path to context xslt 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 should be a relative file name in the directory where the listing will take place 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 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 behaviors takes place Format listing entries entry type file dir urlPath aPath size date

    Original URL path: http://ticket.eppa.es/docs/default-servlet.html (2015-09-25)
    Open archived version from archive


  • Apache Tomcat 7 (7.0.22) - Load Balancer HOW-TO
    Mavenized 28 Security Considerations 29 Windows Service 30 Windows Authentication 31 Tomcat s JDBC Pool Reference Release Notes Configuration Tomcat Javadocs Servlet Javadocs JSP 2 2 Javadocs EL 2 2 Javadocs JK 1 2 Documentation Apache Tomcat Development Building Changelog Status Developers Architecture Functional Specs 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

    Original URL path: http://ticket.eppa.es/docs/balancer-howto.html (2015-09-25)
    Open archived version from archive

  • Apache Tomcat 7 (7.0.22) - Connectors How To
    JSP 2 2 Javadocs EL 2 2 Javadocs JK 1 2 Documentation Apache Tomcat Development Building Changelog Status Developers Architecture Functional Specs 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

    Original URL path: http://ticket.eppa.es/docs/connectors.html (2015-09-25)
    Open archived version from archive

  • Apache Tomcat 7 (7.0.22) - Monitoring and Managing Tomcat
    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 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

    Original URL path: http://ticket.eppa.es/docs/monitoring.html (2015-09-25)
    Open archived version from archive

  • Apache Tomcat 7 (7.0.22) - Logging in Tomcat
    per web application logging as the configuration is per VM As a result Tomcat will in the default configuration replace the default LogManager implementation with a container friendly implementation called JULI which addresses these shortcomings It supports the same configuration mechanisms as the standard JDK java util logging using either a programmatic approach or properties files The main difference is that per classloader properties files can be set which enables easy redeployment friendly webapp configuration and the properties files support slightly extended constructs which allows more freedom for defining handlers and assigning them to loggers JULI is enabled by default and supports 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 Here is how you would set debugging from Tomcat You would need to ensure the ConsoleHandler s or FileHandler s level is also set to collect this threshold so FINEST or ALL should be set Please refer to java util logging documentation in the JDK for the complete details org apache catalina level FINEST The configuration used by JULI is extremely similar to the one supported by plain java util logging but uses a few extensions to allow better flexibility in assigning loggers 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 As in Java 6 loggers can define a list of handlers using the loggerName handlers property 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 servlet examples 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 productive 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

    Original URL path: http://ticket.eppa.es/docs/logging.html (2015-09-25)
    Open archived version from archive

  • Apache Tomcat 7 (7.0.22) - Apache Portable Runtime (APR) based Native library for Tomcat
    native process handling shared memory NT pipes and Unix sockets These features allows making Tomcat a general purpose webserver will enable much better integration with other native web technologies and overall make 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

    Original URL path: http://ticket.eppa.es/docs/apr.html (2015-09-25)
    Open archived version from archive

  • Apache Tomcat 7 (7.0.22) - Virtual Hosting and Tomcat
    Development Building Changelog Status Developers Architecture Functional Specs Virtual Hosting and Tomcat Table of Contents Assumptions server xml Webapps Directory Configuring Your Contexts General context xml approach 1 context xml 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

    Original URL path: http://ticket.eppa.es/docs/virtual-hosting-howto.html (2015-09-25)
    Open archived version from archive

  • Apache Tomcat 7 (7.0.22) - Advanced IO and Tomcat
    instantly invoke your event chain with an ERROR as it catches the error for you and you will be notified of the error at that time EventType END End may be called to end the processing of the request Fields that have been initialized in the begin method should be reset After this event has been processed the request and response objects as well as all their dependent objects will be recycled and used to process other requests End will also be called when data is available and the end of file is reached on the request input this usually indicates the client has pipelined a request EventType ERROR Error will be called by the container in the case where an IO exception or a similar unrecoverable error occurs on the connection Fields that have been initialized in the begin method should be reset After this event has been processed the request and response objects as well as all their dependent objects will be recycled and used to process other requests There are some event subtypes which allow finer processing of events note some of these events require usage of the org apache catalina valves CometConnectionManagerValve valve EventSubType TIMEOUT The connection timed out sub type of ERROR note that this ERROR type is not fatal and the connection will not be closed unless the servlet uses the close method of the event EventSubType CLIENT DISCONNECT The client connection was closed sub type of ERROR method of the event EventSubType IOEXCEPTION An IO exception occurred such as invalid content for example an invalid chunk block sub type of ERROR EventSubType WEBAPP RELOAD The web application is being reloaded sub type of END EventSubType SESSION END The servlet ended the session sub type of END As described above the typical lifecycle of a Comet request will consist in a series of events such as BEGIN READ READ READ ERROR TIMEOUT At any time the servlet may end processing of the request by using the close method of the event object CometFilter Similar to regular filters a filter chain is invoked when comet events are processed These filters should implement the CometFilter interface which works in the same way as the regular Filter interface and should be declared and mapped in the deployment descriptor in the same way as a regular filter The filter chain when processing an event will only include filters which match all the usual mapping rules and also implement the CometFiler interface Example code The following pseudo code servlet implements asynchronous chat functionality using the API described above public class ChatServlet extends HttpServlet implements CometProcessor protected ArrayList HttpServletResponse connections new ArrayList HttpServletResponse protected MessageSender messageSender null public void init throws ServletException messageSender new MessageSender Thread messageSenderThread new Thread messageSender MessageSender getServletContext getContextPath messageSenderThread setDaemon true messageSenderThread start public void destroy connections clear messageSender stop messageSender null Process the given Comet event param event The Comet event that will be processed throws IOException throws ServletException public void event CometEvent event

    Original URL path: http://ticket.eppa.es/docs/aio.html (2015-09-25)
    Open archived version from archive