facebook

myfaces and error in jsp page

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #208190 Reply

    snpe
    Member

    I try myfaces-examples (last cvs) – myfaces is JSF implementation with added components like datalist,tree etc and validator like regexp validator

    in examples application is there validate.jsp with this :

    <h:inputText id=”regExprValue” value=”#{validateForm.regExpr}”
    required=”true”>
    <x:validateRegExpr pattern=”\d{5}” />
    </h:inputText>

    Myeclipse return erro on line 3 (\d{5}) :

    Invalid escape sequence (valid ones are \b \t \n \f \r \” \’ \\ )

    This is correct syntax

    regards
    Haris Peco

    #208228 Reply

    No Operation
    Member

    I disagree, since the backslash is the escape character, it must be escaped:

     <x:validateRegExpr pattern="\\d{5}" /> 

    regards

    NOP

    #208236 Reply

    snpe
    Member

    I try and have same error in myeclipse

    regards

    #208248 Reply

    Riyad Kalla
    Member

    snpe,
    Try and add slashes until the error goes away… I ran down something like this with another person in another thread and they ended up needing: “\\\\d” or something to that effect… if you read the regular expression docs in Java, you someitmes run into this situation as well where you need to super-escape sequences… its a bit of a mystery to me.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: myfaces and error in jsp page

You must be logged in to post in the forum log in