On Feb 12, 2013, at 12:11 PM, Sabrina Lautier wrote:

> Hi,
> 
> [Tomcat version: 7.0, OS: Windows 7 en]
> 
> I wrote a java prg that gets the name and password of a user who has
> manager-script as role in file tomcat-users.xml.
> The current entry found in that file is:
> <user name="test" password="xxx" roles="admin-gui,manager-gui" />
> , it was created during the tomcat installation process and I haven't
> edited it since then.

The documentation would seem to agree with this format.

  https://tomcat.apache.org/tomcat-7.0-doc/realm-howto.html#UserDatabaseRealm

> 
> But comments in this file indicate username and not name:
> -----------------------------------------------------------------------------
> <!--
>  <role rolename="tomcat"/>
>  <role rolename="role1"/>
>  <user username="tomcat" password="tomcat" roles="tomcat"/>
>  <user username="both" password="tomcat" roles="tomcat,role1"/>
>  <user username="role1" password="tomcat" roles="role1"/>
> -->
> -----------------------------------------------------------------------------
> 

If you're curious, you could simply uncomment this and see what happens.  You 
can explore the user database by connecting with jconsole and looking at the 
Mbeans.  Look for the "Users" node.

Dan

> Can someone please say which attribute is the proper one for elt <user>:
> name or username ?
> The documentation is unclear to me on that specific point.
> 
> Regards,
> Sabrina

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to