Thanks you Nils !
It seems to be a good alternative...
but i loose the benefit of the setProperty method...


Yes sure but my boss don't want to use javascript for field verification :/


I found something on http://www.jsptut.com/Taglibs.html

It talk about Blazix server. This server have a tag libraries which allows
to use a catch...

<blx:setProperty name="user"
     property="*"
     onError="errorHandler"/>
<%
    if ( haveError ) {
        out.println( errors.toString());
        pageContext.include( "GetName.jsp" );
    } else
        pageContext.forward( "NextPage.jsp" );
%>

I think it can be interresting ...

Thierry



Nils wrote :

or with JSP
try {
int age = Interger.parseInt(request.getParameter("age"));
bean.setAge(age);
}
ctach (NumberFormatException e) {
   error ="Age not a number!";
}


So you cant use the setProperty tags to set the bean because it will use
parseInt but not catch the exception for you.

===========================================================================
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