[Esapi-user] Esapi-user Digest, Vol 27, Issue 3

ashish kumar Gautam gautamashishkumar at gmail.com
Tue Jan 31 06:02:38 UTC 2012


Hi  Prashmit Tanay,

Set the path of resource directory that contain ESAPI.properties file and
validation files. It should be pass when JVM started

like this:-
-Dorg.owasp.esapi.resources="c:\resources"



Have you try this

protected void doGet(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException
{
response.setContentType("text/html");
PrintWriter out=response.getWriter();
String email=request.getParameter("email");
try
{

boolean b= ESAPI.validator().isValidInput("email",
request.getParameter("email"), "Email",
request.getParameter("email").length(), false);
out.print("Result: " +b);

 }
 catch(Exception e)
 {

 }
 }

if you have any issues in ESAPI configuration, send me a mail with Error
Trace.

Regards
Ashish K. Gautam
NIC Delhi India




On Mon, Jan 30, 2012 at 5:30 PM, <esapi-user-request at lists.owasp.org> wrote:

> Send Esapi-user mailing list submissions to
>        esapi-user at lists.owasp.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        https://lists.owasp.org/mailman/listinfo/esapi-user
> or, via email, send a message with subject or body 'help' to
>        esapi-user-request at lists.owasp.org
>
> You can reach the person managing the list at
>        esapi-user-owner at lists.owasp.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Esapi-user digest..."
>
>
> Today's Topics:
>
>   1. java.lang.NoClassDefFoundError:
>      org/owasp/validator/html/PolicyException (Prashmit Tanay)
>   2. Re: java.lang.NoClassDefFoundError:
>      org/owasp/validator/html/PolicyException (Fabio Cerullo)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 30 Jan 2012 12:25:00 +0530
> From: Prashmit Tanay <prashmittanay at gmail.com>
> To: esapi-user at lists.owasp.org
> Subject: [Esapi-user] java.lang.NoClassDefFoundError:
>        org/owasp/validator/html/PolicyException
> Message-ID:
>        <CAEdtgRKA4kSpRTrn3jcVgCdtsMp4Lv-JQoAp0hARWDZ8smdN3Q at mail.gmail.com
> >
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hello,
>
> I am trying an Input Validation using the ESAPI 1.4.4. I am constantly
> getting a java.lang.NoClassDefFoundError:
> org/owasp/validator/html/PolicyException error.
>
> I am using Eclipse EE IDE 1.4.2
> ESAPI version: 1.4.4
> Java: 1.6
>
> protected void doGet(HttpServletRequest request, HttpServletResponse
> response) throws ServletException, IOException {
> response.setContentType("text/html");
> PrintWriter out=response.getWriter();
> String email=request.getParameter("email");
> try{
> Validator validator=ESAPI.validator();
> boolean b=validator.isValidInput("Email_validity", email, "Email", 50,
> false);
> out.print("Result: " +b);
>  }
> catch(Exception e){
>  }
>  }
>
> --
> Prashmit Tanay
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.owasp.org/pipermail/esapi-user/attachments/20120130/9f83be78/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 2
> Date: Mon, 30 Jan 2012 11:30:58 +0000
> From: Fabio Cerullo <fcerullo at gmail.com>
> To: Prashmit Tanay <prashmittanay at gmail.com>
> Cc: esapi-user at lists.owasp.org
> Subject: Re: [Esapi-user] java.lang.NoClassDefFoundError:
>        org/owasp/validator/html/PolicyException
> Message-ID:
>        <CAFUMsoDT=1sFM92Bf-_RBRty49FFAHaDgms-z1zio-Pq=_L2MA at mail.gmail.com
> >
> Content-Type: text/plain; charset="iso-8859-1"
>
> Have you tried these?
>
> http://code.google.com/p/owasp-esapi-java/issues/detail?id=138
>
> Fabio
>
> On Mon, Jan 30, 2012 at 6:55 AM, Prashmit Tanay <prashmittanay at gmail.com
> >wrote:
>
> > Hello,
> >
> > I am trying an Input Validation using the ESAPI 1.4.4. I am constantly
> > getting a java.lang.NoClassDefFoundError:
> > org/owasp/validator/html/PolicyException error.
> >
> > I am using Eclipse EE IDE 1.4.2
> > ESAPI version: 1.4.4
> > Java: 1.6
> >
> > protected void doGet(HttpServletRequest request, HttpServletResponse
> > response) throws ServletException, IOException {
> >  response.setContentType("text/html");
> > PrintWriter out=response.getWriter();
> >  String email=request.getParameter("email");
> > try{
> > Validator validator=ESAPI.validator();
> >  boolean b=validator.isValidInput("Email_validity", email, "Email", 50,
> > false);
> > out.print("Result: " +b);
> >  }
> > catch(Exception e){
> >  }
> >  }
> >
> > --
> > Prashmit Tanay
> >
> > _______________________________________________
> > Esapi-user mailing list
> > Esapi-user at lists.owasp.org
> > https://lists.owasp.org/mailman/listinfo/esapi-user
> >
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.owasp.org/pipermail/esapi-user/attachments/20120130/d86e21ab/attachment-0001.html
> >
>
> ------------------------------
>
> _______________________________________________
> Esapi-user mailing list
> Esapi-user at lists.owasp.org
> https://lists.owasp.org/mailman/listinfo/esapi-user
>
>
> End of Esapi-user Digest, Vol 27, Issue 3
> *****************************************
>



-- 
Best regards,
Ashish K. Gautam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.owasp.org/pipermail/esapi-user/attachments/20120131/39906dcf/attachment.html>


More information about the Esapi-user mailing list