Fierozen / owasp-esapi-java

Automatically exported from code.google.com/p/owasp-esapi-java
Other
0 stars 0 forks source link

java.lang.ClassNotFoundException: org.owasp.validator.html.PolicyException #260

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The following code is generating the above exception. 

protected void doPost(HttpServletRequest request, HttpServletResponse response) 
throws ServletException, IOException {
        response.setContentType("text/html");
        PrintWriter out=response.getWriter();
        String mailPattern="^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\\.[a-zA-Z]{2,4}$";

        try
        {
            DefaultValidator d=new DefaultValidator();
            boolean b=d.isValidInput("Mail_Pattern", request.getParameter( "zip" ), mailPattern, 10, false);     
                        if(b)
                        {
                           out.println("Correct e-mail");
                        }

        }
                catch(Exception e)
                {}

Original issue reported on code.google.com by prashmit...@gmail.com on 29 Jan 2012 at 9:53