Introducing Java Servlet Container beta.
This commit is contained in:
@@ -88,6 +88,10 @@ static nxt_int_t nxt_conf_vldt_argument(nxt_conf_validation_t *vldt,
|
||||
nxt_conf_value_t *value);
|
||||
static nxt_int_t nxt_conf_vldt_php_option(nxt_conf_validation_t *vldt,
|
||||
nxt_str_t *name, nxt_conf_value_t *value);
|
||||
static nxt_int_t nxt_conf_vldt_java_classpath(nxt_conf_validation_t *vldt,
|
||||
nxt_conf_value_t *value);
|
||||
static nxt_int_t nxt_conf_vldt_java_option(nxt_conf_validation_t *vldt,
|
||||
nxt_conf_value_t *value);
|
||||
|
||||
|
||||
static nxt_conf_vldt_object_t nxt_conf_vldt_http_members[] = {
|
||||
@@ -423,6 +427,31 @@ static nxt_conf_vldt_object_t nxt_conf_vldt_ruby_members[] = {
|
||||
};
|
||||
|
||||
|
||||
static nxt_conf_vldt_object_t nxt_conf_vldt_java_members[] = {
|
||||
{ nxt_string("classpath"),
|
||||
NXT_CONF_VLDT_ARRAY,
|
||||
&nxt_conf_vldt_array_iterator,
|
||||
(void *) &nxt_conf_vldt_java_classpath},
|
||||
|
||||
{ nxt_string("webapp"),
|
||||
NXT_CONF_VLDT_STRING,
|
||||
NULL,
|
||||
NULL },
|
||||
|
||||
{ nxt_string("options"),
|
||||
NXT_CONF_VLDT_ARRAY,
|
||||
&nxt_conf_vldt_array_iterator,
|
||||
(void *) &nxt_conf_vldt_java_option},
|
||||
|
||||
{ nxt_string("unit_jars"),
|
||||
NXT_CONF_VLDT_STRING,
|
||||
NULL,
|
||||
NULL },
|
||||
|
||||
NXT_CONF_VLDT_NEXT(&nxt_conf_vldt_common_members)
|
||||
};
|
||||
|
||||
|
||||
nxt_int_t
|
||||
nxt_conf_validate(nxt_conf_validation_t *vldt)
|
||||
{
|
||||
@@ -818,6 +847,7 @@ nxt_conf_vldt_app(nxt_conf_validation_t *vldt, nxt_str_t *name,
|
||||
nxt_conf_vldt_php_members,
|
||||
nxt_conf_vldt_perl_members,
|
||||
nxt_conf_vldt_ruby_members,
|
||||
nxt_conf_vldt_java_members,
|
||||
};
|
||||
|
||||
ret = nxt_conf_vldt_type(vldt, name, value, NXT_CONF_VLDT_OBJECT);
|
||||
@@ -1216,3 +1246,44 @@ nxt_conf_vldt_php_option(nxt_conf_validation_t *vldt, nxt_str_t *name,
|
||||
|
||||
return NXT_OK;
|
||||
}
|
||||
|
||||
|
||||
static nxt_int_t
|
||||
nxt_conf_vldt_java_classpath(nxt_conf_validation_t *vldt, nxt_conf_value_t *value)
|
||||
{
|
||||
nxt_str_t str;
|
||||
|
||||
if (nxt_conf_type(value) != NXT_CONF_STRING) {
|
||||
return nxt_conf_vldt_error(vldt, "The \"classpath\" array "
|
||||
"must contain only string values.");
|
||||
}
|
||||
|
||||
nxt_conf_get_string(value, &str);
|
||||
|
||||
if (nxt_memchr(str.start, '\0', str.length) != NULL) {
|
||||
return nxt_conf_vldt_error(vldt, "The \"classpath\" array must not "
|
||||
"contain strings with null character.");
|
||||
}
|
||||
|
||||
return NXT_OK;
|
||||
}
|
||||
|
||||
static nxt_int_t
|
||||
nxt_conf_vldt_java_option(nxt_conf_validation_t *vldt, nxt_conf_value_t *value)
|
||||
{
|
||||
nxt_str_t str;
|
||||
|
||||
if (nxt_conf_type(value) != NXT_CONF_STRING) {
|
||||
return nxt_conf_vldt_error(vldt, "The \"options\" array "
|
||||
"must contain only string values.");
|
||||
}
|
||||
|
||||
nxt_conf_get_string(value, &str);
|
||||
|
||||
if (nxt_memchr(str.start, '\0', str.length) != NULL) {
|
||||
return nxt_conf_vldt_error(vldt, "The \"options\" array must not "
|
||||
"contain strings with null character.");
|
||||
}
|
||||
|
||||
return NXT_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user