Hi,
can you tell us what you want to do? I'm asking cause I don't
understand why you're using the mask validation. Generally, if you
encounter problems with default validation annotation try to use

@ValidationMethod
public void validateStuff(ValidationErrors errors) {
   boolean isValid = ...
   if(!isValid)
      errors.add(fieldname, new SimpleError("The value is invalid"));
}

Regards,
Richard

On Tue, Feb 9, 2010 at 6:38 AM, Ajay Thukral <[email protected]> wrote:
>
>
> Hi,
>
> We are facing an issue while using the special characters like Ç Ä i.e 2
> byte characters as input.
> I want to enter these characters in the stripes:text box in jsp and then
> validate the input using the @validate annotation in the action Bean.
>
> @Validate(field = " billcity", mask =
> "[[\u00DC\u00D6\u00C4\u00DF\u00E4\u00F6\u00FC\u00C0\u00E0\u00C2\u00E2\u00E7\u00C7\u00C8\u00E8\u00C9\u00E9\u00CA\u00EA\u00CB\u00EB\u00CE\u00EE\u00CF\u00EF\u00D4\u00F4\u00D9\u00F9\u00DB\u00FB\u00C6\u00E6\u0152\u0153]\\w,\\s-/+%(.)//&;#]+",
> on = “saveMethod”),
>
> The mask method is not validating the input even if the regular expression
> is correct and the input matches it.
>
> The problem seems is that if I enter string as  “45is+%()&hÇÄ” what I
> receive in action Bean (java class ) is  “45is+%()&hC?A?”. I can see it by
> printing  i.e System.out.println(getBillcity()).
>
> I have also checked the requestCharEncoding
> (getContext().getRequest().getCharacterEncoding()) in java class and it is
> also utf-8.
>
> jsp :
> I have a jsp mentioned encoding as utf-8 in  at the following points:
> <%@ page contentType="text/html;charset=UTF-8" language="java" %>
> ………….
> ……..
>  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
> ………….
> ……..
>
> <stripes:form id="viewInfoForm" action="/UserManager.action" method="post"
> name="InfoForm" enctype="UTF-8">
> ………….
> ……..
>
>
>
>
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> Stripes-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>



-- 
Richard Hauswald
Blog: http://tnfstacc.blogspot.com/
LinkedIn: http://www.linkedin.com/in/richardhauswald
Xing: http://www.xing.com/profile/Richard_Hauswald

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to