You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by David Goodenough <da...@btconnect.com> on 2011/01/25 13:21:33 UTC
Which is right, the comment or the docs?
In the file tomcat-users.xml (at least the one shipped with the 6.0.23 Debian
package) the sample users have the attribute username= in the user tag. But
in the manager-howto.html (again shipped with the Debian package) the examples
all say the attribute should be name=. Which is right?
David
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Which is right, the comment or the docs?
Posted by David Goodenough <da...@btconnect.com>.
On Tuesday 25 January 2011, Konstantin Kolinko wrote:
> 2011/1/25 David Goodenough <da...@btconnect.com>:
> > In the file tomcat-users.xml (at least the one shipped with the 6.0.23
> > Debian package) the sample users have the attribute username= in the
> > user tag. But in the manager-howto.html (again shipped with the Debian
> > package) the examples all say the attribute should be name=. Which is
> > right?
>
> Either one works.
>
> o.a.c.users..MemoryUserCreationFactory#createObject(Attributes attributes):
>
> String username = attributes.getValue("username");
> if (username == null) {
> username = attributes.getValue("name");
> }
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
Might it not be an idea to document this in both the manager-howto and
the sample config file?
Otherwise its just confusing.
David
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Which is right, the comment or the docs?
Posted by Konstantin Kolinko <kn...@gmail.com>.
2011/1/25 David Goodenough <da...@btconnect.com>:
> In the file tomcat-users.xml (at least the one shipped with the 6.0.23 Debian
> package) the sample users have the attribute username= in the user tag. But
> in the manager-howto.html (again shipped with the Debian package) the examples
> all say the attribute should be name=. Which is right?
Either one works.
o.a.c.users..MemoryUserCreationFactory#createObject(Attributes attributes):
String username = attributes.getValue("username");
if (username == null) {
username = attributes.getValue("name");
}
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org