Thanks you for your answers
It's sure that the javascript is more efficient to check the fields before
sending to the server
but my boss don't want to use javascript because he want that the checking
will be
realised on the server side :(
...
Thanks you
Thierry
-----Message d'origine-----
De : Michael Sweeney [mailto:[EMAIL PROTECTED]]
Envoyé : jeudi 5 avril 2001 18:52
À : [EMAIL PROTECTED]
Objet : Re: How can I catch an JSP error ????
Remember that when the form is submitted, it always sends data as a string
in any case, no matter what the user enters. You have to use
Integer.parseInt(request.getParameter('paramName') to make the value an int
anyway. You might also want to check the form input with some javascript to
make sure the user enters valid data before it's submitted, but that
doesn't change the need to convert to an int once the data is submitted.
Michael
At 04:06 PM 4/5/01 +0200, you wrote:
>Hello,
>
>I have a jsp which filled a bean with 3 variables : a name, an address
email
>and an age.
>
>This is a part of my JSP :
>
><%@ page import="test_tbe" errorPage="error.jsp" %>
>
><jsp:useBean id ="test" scope="page" class="test_tbe" />
><jsp:setProperty name="test" property="name" param="p_name"/>
><jsp:setProperty name="test" property="email" param="p_email"/>
><jsp:setProperty name="test" property="age" param="p_age"/>
>
>
>
>Hello
>please enter your name and your email ... Name :
>Email :
>Age :
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets