Hi,
But Micheal if u use setProperty the conversion from string to int
would be automatically done if the value entered is a numeral. I think
this is one of the intospection features. pls correct me if i am
wrong.
John




Michael Sweeney <[EMAIL PROTECTED]>@java.sun.com> on 04/05/2001
10:22:14 PM

Please respond to A mailing list about Java Server Pages specification
      and reference <[EMAIL PROTECTED]>

Sent by:  A mailing list about Java Server Pages specification and
      reference <[EMAIL PROTECTED]>


To:   [EMAIL PROTECTED]
cc:
Subject:  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

Reply via email to