Tomcat Websphere


Apache Tomcat is more than capable as a basic file server. While it isn't optimized to handle file formats such as HTML, PDF, mp3 or mp4, it's a strong file server that's very popular in enterprises. Tomcat is a product of the Apache Software Foundation (ASF), which also deploys Apache HTTP Server. Tomcat is normally defined as a reference implementation of the Java Servlet and the Java Server Page (JSP) Specifications. It basically executes Java servlets and renders web pages which include JSP coding.


If Tomcat is unable to identify the appropriate resource factory and/oradditional configuration information is required, additional Tomcat specificconfiguration must be specified before Tomcat can create the resource.Tomcat specific resource configuration is entered inthe <Context> elements thatcan be specified in either $CATALINA_BASE/conf/server.xml or,preferably, the per-web-application context XML file(META-INF/context.xml).

Tomcat specific resource configuration is performed using the followingelements in the <Context>element:

Websphere vs jboss
  • <Environment> - Configure names and values for scalar environment entries that will be exposed to the web application through the JNDI InitialContext (equivalent to the inclusion of an <env-entry> element in the web application deployment descriptor).
  • <Resource> - Configure the name and data type of a resource made available to the application (equivalent to the inclusion of a <resource-ref> element in the web application deployment descriptor).
  • <ResourceLink> - Add a link to a resource defined in the global JNDI context. Use resource links to give a web application access to a resource defined in the <GlobalNamingResources> child element of the <Server> element.
  • <Transaction> - Add a resource factory for instantiating the UserTransaction object instance that is available at java:comp/UserTransaction.

Any number of these elements may be nested inside a<Context> element and willbe associated only with that particular web application.

Tomcat Websphere

If a resource has been defined in a<Context> element it is notnecessary for that resource to be defined in /WEB-INF/web.xml.However, it is recommended to keep the entry in /WEB-INF/web.xmlto document the resource requirements for the web application.

Tomcat Websphere Mq

Where the same resource name has been defined for a<env-entry> element included in the web applicationdeployment descriptor (/WEB-INF/web.xml) and in an<Environment> element as part of the<Context> element for theweb application, the values in the deployment descriptor will take precedenceonly if allowed by the corresponding<Environment> element (by setting the overrideattribute to 'true').