You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2013/07/29 19:46:48 UTC
svn commit: r1508152 -
/tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java
Author: markt
Date: Mon Jul 29 17:46:48 2013
New Revision: 1508152
URL: http://svn.apache.org/r1508152
Log:
Better documentation.
Modified:
tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java
Modified: tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java?rev=1508152&r1=1508151&r2=1508152&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java Mon Jul 29 17:46:48 2013
@@ -179,22 +179,32 @@ public class Tomcat {
}
/**
- * Add a webapp using normal WEB-INF/web.xml if found.
+ * This is equivalent to adding a web application to Tomcat's webapps
+ * directory. The equivalent of the default web.xml will be applied to the
+ * web application and any WEB-INF/web.xml packaged with the application
+ * will be processed normally. Normal web fragment and
+ * {@link javax.servlet.ServletContainerInitializer} processing will be
+ * applied.
*
- * @param contextPath
- * @param baseDir
- * @return new Context
* @throws ServletException
*/
- public Context addWebapp(String contextPath,
- String baseDir) throws ServletException {
+ public Context addWebapp(String contextPath, String baseDir)
+ throws ServletException {
return addWebapp(getHost(), contextPath, baseDir);
}
/**
- * Add a context - programmatic mode, no web.xml used.
+ * Add a context - programmatic mode, no default web.xml used. This means
+ * that there is no JSP support (no JSP servlet), no default servlet and
+ * no web socket support unless explicitly enabled via the programmatic
+ * interface. There is also no
+ * {@link javax.servlet.ServletContainerInitializer} processing and no
+ * annotation processing. If a
+ * {@link javax.servlet.ServletContainerInitializer} is added
+ * programmatically, there will still be no scanning for
+ * {@link javax.servlet.annotation.HandlesTypes} matches.
*
* API calls equivalent with web.xml:
*
@@ -470,10 +480,16 @@ public class Tomcat {
return server;
}
+ /**
+ * @see {@link #addContext(String, String)}
+ */
public Context addContext(Host host, String contextPath, String dir) {
return addContext(host, contextPath, contextPath, dir);
}
+ /**
+ * @see {@link #addContext(String, String)}
+ */
public Context addContext(Host host, String contextPath, String contextName,
String dir) {
silence(host, contextPath);
@@ -491,10 +507,16 @@ public class Tomcat {
return ctx;
}
+ /**
+ * @see {@link #addWebapp(String, String)}.
+ */
public Context addWebapp(Host host, String url, String path) {
return addWebapp(host, url, url, path);
}
+ /**
+ * @see {@link #addWebapp(String, String)}.
+ */
public Context addWebapp(Host host, String url, String name, String path) {
silence(host, url);
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org