costin 02/04/29 23:41:18
Modified: jk/native2/include jk_uriEnv.h
Log:
Reorganize the struct, add support for storing vhost and context settings.
The mapping is now done in the same way as in tomcat: first vhost and
context, then exact, prefix and suffix rules.
We use a tree structure ( only 3 levels ) - other optimizations are
possible but probably less effective.
Revision Changes Path
1.11 +48 -33 jakarta-tomcat-connectors/jk/native2/include/jk_uriEnv.h
Index: jk_uriEnv.h
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_uriEnv.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- jk_uriEnv.h 29 Apr 2002 19:35:35 -0000 1.10
+++ jk_uriEnv.h 30 Apr 2002 06:41:18 -0000 1.11
@@ -118,50 +118,74 @@
struct jk_workerEnv *workerEnv;
- struct jk_webapp *webapp;
-
+ struct jk_uriMap *uriMap;
+
/* Generic name/value properties. Some workers may use it.
*/
struct jk_map *properties;
- /* Original uri ( unparsed )
+ /* -------------------- Properties extracted from the URI name ---------- */
+ /** Full name */
+ char *name;
+
+ /* Virtual server handled - NULL means 'global' ( visible in all
+ * virtual servers ). Part of the uri name.
+ */
+ char *virtual;
+
+ /* Original uri ( unparsed ). Part of the uri name.
*/
char *uri;
- /** XXX todo.
+ /* -------------------- Properties set using setAttribute ---------- */
+ /** ContextPath. Set with 'context' attribute.
*/
- int status;
+ char *contextPath;
+ int ctxt_len;
- /** Servlet. No need to compute it again in tomcat
+ /** ServletName. Set with 'servlet' attribute.
*/
char *servlet;
int servletId;
+ /** Group, set with 'group' attribute. Defaults to 'lb'.
+ */
+ char *workerName;
+ struct jk_worker *worker;
+
+ /** Debug for that location. Set with 'debug'
+ */
+ int debug;
+
+ /** For MATCH_TYPE_HOST, the list of aliases for the virtual host.
+ * Set using (multi-value ) 'alias' attribute on vhost uris.
+ */
+ struct jk_map *aliases;
+
+ /* -------------------- Properties extracted from the uri, at init()
-------------------- */
/* Extracted suffix, for extension-based mathces */
char *suffix;
+ int suffix_len;
+
+ /* Prefix based mapping. Same a contextPath for MATCH_TYPE_CONTEXT
+ */
char *prefix;
-
int prefix_len;
- int suffix_len;
int match_type;
- int debug;
-
- /** Worker associated with this uri
- Inherited by virtual host. Defaults to the first declared worker.
- ( if null == use default worker ).
- */
- struct jk_worker *worker;
-
- /** worker name - allow this to be set before the worker is defined.
- * worker will be set on init.
+ /** For MATCH_TYPE_HOST, the list of webapps in that host
*/
- char *workerName;
+ struct jk_map *webapps;
- /** You can fine-tune the logging level per location
+ /** For MATCH_TYPE_CONTEXT, the list of local mappings
*/
- int logLevel;
+ struct jk_map *exactMatch;
+ struct jk_map *prefixMatch;
+ struct jk_map *suffixMatch;
+
+ /* -------------------- Other properties -------------------- */
+
/** Different apps can have different loggers.
*/
@@ -172,19 +196,10 @@
int envvars_in_use;
struct jk_map *envvars;
- /* Virtual server handled - NULL means 'global' ( visible in all
- * virtual servers ). This is the canonical name.
- */
- char *virtual;
- int virtualPort;
-
- /** Uri we're monted on
- * The 'id' is the index in the context table ( todo ), it
- * reduce the ammount of trafic ( and string creation on java )
+ /** XXX .
*/
- char *context;
- int ctxt_len;
- int contextId;
+/* int status; */
+/* int virtualPort; */
/* -------------------- Methods -------------------- */
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>