5 Replies Latest reply on Oct 25, 2010 3:08 AM by lvdberg

    how to add the validation in the JSP level

    sumaprakash

      hai friends,iam facing problem in validating the page at JSP level please help me in doing so

        • 1. Re: how to add the validation in the JSP level
          lvdberg

          Hi,


          If you have problems with the normal JSF validation, take a look at the f: prefixed tags. They contain different validators for use in your page. however if you're referring to more dynamic validation, you possibly need to look at the entity validation with Hibernate validation combined with ajax requests.


          the first approach is definitely not a subject for this forum, but the second way possibly is. Please make clear what you precisely want to achieve and we can help you.


          Leo

          • 2. Re: how to add the validation in the JSP level
            sumaprakash

            if we are going to design a JSP level page then how to validate with in the page itself...for example if the page containes a login id and password then it should validate in that page itself rather than going to and query or a POJO..reply it ..it is very urgent for me...

            • 3. Re: how to add the validation in the JSP level
              lvdberg

              Hi,


              Validating in the page itself without server interaction should be done with javascript and that is not a subject for this forum.


              Leo

              • 4. Re: how to add the validation in the JSP level
                sumaprakash

                iam new to seam thats why iam not able to justify my work i need to learn .can u help me in doing this ..can u please say the following Q's:
                1. can we perform the validation in jsp level
                2. where can we perform the validation
                3. how can we do that
                4. can u give a simple example

                • 5. Re: how to add the validation in the JSP level
                  lvdberg

                  Hi,


                  I would like to help you but I think you're complicating things too much for yourself. Seam can be pretty complex , even if you're a experienced java developer.


                  To start with: I assume you mean JSF and NOT JSP (which is java server pages; a bit outdated technology).


                  You mentioned



                  iam facing problem in validating the page at JSP level


                  I assume again that you want to validate the page FIELDS before sending them to the server; which is javascript technology. If you mean that you want to validate these fields on the server you mean something else. In the first case: try to look at the pages where they explain such stuff (this is NOT the right place for javascript questions!!()
                  In the second case, have a look at Hibernate validation which is Seam-core technology. The SEAM DOCUMENTATION contains examples on how to do that. Pleasedownload the documentation AND the examples which contains sufficient help to achieve wahet you want.


                  Leo