You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by co...@apache.org on 2003/03/25 18:48:42 UTC
cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat5 CoyoteRequest.java
costin 2003/03/25 09:48:42
Modified: coyote/src/java/org/apache/coyote/tomcat5 CoyoteRequest.java
Log:
Get the Host from the Context, it simplifies the mapping and registration of Hosts
Revision Changes Path
1.22 +13 -5 jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat5/CoyoteRequest.java
Index: CoyoteRequest.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat5/CoyoteRequest.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- CoyoteRequest.java 5 Mar 2003 02:31:47 -0000 1.21
+++ CoyoteRequest.java 25 Mar 2003 17:48:42 -0000 1.22
@@ -127,6 +127,7 @@
import org.apache.catalina.util.RequestUtil;
import org.apache.catalina.util.StringManager;
import org.apache.catalina.util.StringParser;
+import org.apache.commons.logging.Log;
/**
* Wrapper object for the Coyote request.
@@ -385,6 +386,11 @@
*/
protected String localAddr = null;
+ /** After the request is mapped to a ServletContext, we can also
+ * map it to a logger.
+ */
+ protected Log log=null;
+
// --------------------------------------------------------- Public Methods
@@ -423,6 +429,7 @@
requestedSessionCookie = false;
requestedSessionId = null;
requestedSessionURL = false;
+ log = null;
parameterMap.setLocked(false);
parameterMap.clear();
@@ -531,7 +538,8 @@
* Return the Host within which this Request is being processed.
*/
public Host getHost() {
- return ((Host) mappingData.host);
+ return (Host)getContext().getParent();
+ //return ((Host) mappingData.host);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org