> In a jsp application i want to calculate digested passowrds dynamically
> According to the Realm How To ... i write this code in a jsp :
>
> <% String digest =
> org.apache.catalina.realm.RealmBase.Digest(request.getParameter("password"),
> "MD5"); %>
Isn't there a "Digest" method in some, more public place? JAAS or some cryptography?
> Here is the result :
>
> org.apache.jasper.JasperException: Unable to compile class for JSP
> Generated servlet error:
> [...] package org.apache.catalina.realm does not exist [...]
In other words, "javac" has no knowledge of Tomcat's internal classes, as it shouldn't.
> [javac] String digest =
> org.apache.catalina.realm.RealmBase.Digest(request.getParameter("password"),
> "MD5");
> [javac]
>
> How can i fix that ? catalina.jar is not in tomcat classpath ?
I'd sugest looking for "Digest" in some of the public APIs of Java platform. That way
you will be transparent to the container (IOW, you'll be able to run your web-app on
something other than Tomcat).
Nix.