Paritosh,
First, notice that the statement
                       <xsp:logic>
                           dbpw = <esql:get-string column="pw"/>
                       </xsp:logic>
is missing a semicolon. Try putting one in, as Zsombor did:
                       <xsp:logic>
                           dbpw = <esql:get-string column="pw"/> ;
                       </xsp:logic>

Regarding the generated source code, what servlet container are you running? If Tomcat, browse for something like C:\Program Files\Apache Software Foundation\Tomcat 5.5\work\Catalina\localhost\_\cocoon-files\org\apache\cocoon\www\MyApplicationURL..._xsp.java

HTH,
Lars

On 10/19/2006 1:39 PM, Paritosh Patel wrote:
Zsombor,
I have tried the code as suggested, but I get a compilation error. Here is the code I tried:

<?xml version="1.0"?>
<xsp:page xmlns:xsp="http://apache.org/xsp <http://apache.org/xsp>"
xmlns:esql="http://apache.org/cocoon/SQL/v2";> <login>
        <xsp:logic>
            String upw = request.getParameter ("password");
            String dbpw = new String("");
            <esql:execute-query>
                <esql:query>
                    SELECT pw
                    FROM ....
                </esql:query>
                <esql:results>
                    <esql:row-results>
                        <xsp:logic>
                            dbpw = <esql:get-string column="pw"/>
                        </xsp:logic>
                    </esql:row-results>
                </esql:results>
            </esql:execute-query>
if (dbpw.compareTo (upw) == 0)
            {
                session.setAttribute("authenticated", "yes");
            }
        </xsp:logic>
    </login>
</xsp:page>

Upon invoking Cocoon for this page, I get the following errors. Again, if I knew how to get to the Java Source file for this XSP, I could try to fix this.


org.apache.cocoon.components.language.LanguageException: Error compiling authenticate_xsp: ERROR 1 (org\apache\cocoon\www\tosh\ibm_proto5\portal\login\authenticate_xsp.java):
...

dbpw =

(

// start error (lines 336-336) "Invalid cast type expression"
EsqlHelper.getAscii(_esql_query.getResultSet(),"pw","")

// end error
)


this.characters("\n ");

...
ERROR 2 (org\apache\cocoon\www\tosh\ibm_proto5\portal\login\authenticate_xsp.java):
...


if (dbpw.compareTo(upw) == 0)
{

// start error (lines 374-374) "session cannot be resolved"
session.setAttribute("a", "b");

// end error
}

this.characters("\n \n \n ");


...
Line 336, column 0: Invalid cast type expression
Line 374, column 0: session cannot be resolved


Any clue?   Your help is appreciated.

- PDP


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

Reply via email to