You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Paritosh Patel <xy...@gmail.com> on 2006/10/19 12:44:56 UTC

Setting Java variables in esql (in XSPs)

In an XSP, I am having difficulty setting a Java variable to a value
that I get back from a DB. My code continues to have compile error. My
example code would be:

        <xsp:logic>
            Strubg upw = request.getParameter("password");
            String dbpw = new String("");
        </xsp:logic>

                <esql:results>
                    <esql:row-results>

                        <!-- try to set variable dbpw for later testing -->
                        <... But this does not compile -->
                        dbpw = <xsp:expr><esql:get-string
column='pw'/></xsp:expr>

                    </esql:row-results>
                </esql:results>

        <xsp:logic>
            if (dbpw.compareTo(upw) == 0)
            {  ... do something ... }
        </xsp:logic>


Being very new to XSPs and new to how passwords are handled, can anyone help me?

Also, I've read that one can look at the Java source code generated,
but the file must be promptly deleted. How do I tell Cocoon to NOT
erase the Java source file after compilation?

- PDP

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org