public static String digest = "";
public static final String encrypt(String
password) {
if (digest .trim().equals("")) {
try {
digest = MessageDigest.getInstance("MD5");
} catch (NoSuchAlgorithmException e) {
System.err.println("
Failed to load the MD5
MessageDigest. ");
e.printStackTrace();
}
}
// digest .update(digest );
return password;
}
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class HelloWorld extends HttpServlet {
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
{
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("");
out.println("");
out.println("");
out.println("");
out.println("");
out.println("
Hello World!
");
out.println("");
out.println("");
}
}
STEP 1:install NetBeans and JDK
STEP 2:install Sun System Application Server 9
STEP 3:Open the Java Pet Store project
STEP 4:register Sun System Application Server 9
at NetBeans
STEP 5:find javaee.home and change the value for
your Sun System Application Server 9
STEP 6:OK,deploy then Java Pet Store
I want to be done my plan after tow months!
I want to be done my plan after tow months!