How to login to windows AD which requires domain name to be prefixed to the user name with a forward slash?

This is the configuration I use in applicationContextSecurity.xml:

<ldap-server id="ldapServer"
url="ldap://xxx.yyy.zzz:389"
manager-dn="CN=user,OU=Service,OU=grp,DC=xxx,DC=yyy,DC=zzz "
manager-password="password" />

<authentication-manager alias="authenticationManager">
<ldap-authentication-provider
server-ref="ldapServer"
user-dn-pattern="uid={0},dc=xxx,dc=yyy,dc=zzz"
user-search-filter="(uid={0})"
user-search-base="dc=xxx,dc=yyy,dc=zzz"
group-search-base="dc=xxx,dc=yyy,dc=zzz"
group-role-attribute="dc=xxx,dc=yyy,dc=zzz" />
</authentication-manager>

With the above we login to the domain like this {DOMAIN}\USERNAME

The problem is where do we give the domain which is nothing with "xxx" when I use an external LDAP tool and give the user name in format of {DOMAIN}\USERNAME it works (jexplorer)

If I add DOMAIN\USERNAME to the username text box or hard code it in the above configuration before uid= like uid=DOMAIN\{0}

It gives me an error:

Authentication request failed: org.springframework.security.authentication.Authen ticationServiceException: Failed to parse DN; nested exception is org.springframework.ldap.core.TokenMgrError: Lexical error at line 1, column 8. Encountered: "\\" (92), after : ""

I believe it is not allowing the character "\" how can we overcome this as the Windows AD requires this

All help will be appreciated

Thanks
Gaurav Marwaha

Versions:
<spring.version>3.0.5.RELEASE</spring.version>
<spring-security.version>3.0.5.RELEASE</spring-security.version>
<artifactId>spring-ldap-core</artifactId>
<version>1.3.1.RELEASE</version>
<artifactId>spring-ldap-core-tiger</artifactId>
<version>1.3.1.RELEASE</version>