tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Molloy" <>
Subject Automatically Generating htpasswd files
Date Tue, 30 Oct 2001 15:33:43 GMT
   I'm using Tomcat4.0, Apache 1.3 both as standalone and I'm
working on a University project which uses both.  Currently I'm
stuck on the problem of generating htpasswd files using a servlet.
Does anyone know what should be used to generate up files of
the form :


I tried using the following code:

sun.misc.BASE64Encoder enCoder = new sun.misc.BASE64Encoder();
aWriter.write(tempUser.getUsername() + ":" +
enCoder.encode(tempUser.getPassword().getBytes()) + "\n");

but it doesn't seem to be working right - I'm not even sure if
this is exactly what's needed - any ideas please?


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message