I do not want to have java code in my xsp pages,
therefore I want to write a taglibrary for checking
request parameters.

Examples of provided tags:

<date-format param="..." message="...wrong date format..."/>
<check-null param="..." message="...."/>
<check-maxlength param="..." message="...typed text too long..."/>
<check-int param="..." message="...wrong number format..."/>
<check-empty param="..." message="..."/>

the code for each tag will take the request parameter, check a condition
and if it is wrong inserts a <error message="..."/> tag to the document,
which will be displayed for the user.

But, after checking parameters, I want to use <esql:connection> - to perform
database operations. And I do not know how to make the execution of esql
stuff dependent of tags for parameter checking?


        <check-empty param="X" message="Fill X field"/>
        <check-empty param="Y" message="Fill X field"/>
        <date-format param="Z" message="Type correct date in Z field"/>

        <esql:connection>
                <esql:pool>HelpDesk</esql:pool>
                <esql:execute-query>
                <query>INSERT INTO DATA (X,Y,Z) VALUES (
                        <esql:parameter><request:get-parameter 
name="X"/></esql:parameter>
                        <esql:parameter><request:get-parameter 
name="Y"/></esql:parameter>
                        <esql:parameter><request:get-parameter 
name="Z"/></esql:parameter>
                </query>
                </esql:execute-query>
        </esql:connection>



-- 

Kamera wideo Sony, 5000 zl
wygraj w konkursie eMarketu i Onet.pl [ http://konkursy.onet.pl/emarket ]


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to