Cocoon authentication

A

Adam

Hi!

I'm trying to do a login form in cocoon.
Login data are taken from MySQL, but before the data are checked cocoon
throws such an error:
org.apache.cocoon.ResourceNotFoundException: Resource not found.:
org.apache.excalibur.source.SourceNotFoundException: file:/F:/Program
Files/Apache Software Foundation/Tomcat
5.0/webapps/cocoon/portal/sitemap.xmap doesn't exist.
Do you have any suggestions where to check for the error? Why does the
Cocoon change context to cocoon/protal and is looking for sitemap there?

the sitemap fragment is:
<map:match pattern="portal/user/login">
<map:generate src="portal/resources/login.xml"/>
<map:transform src="portal/styles/buildlogin.xsl">
<map:parameter name="use-request-parameters" value="true"/>
</map:transform>
<map:transform type="sql">
<map:parameter name="use-connection" value="portal"/>
</map:transform>...........

LOGIN.XML file in directory cocoon\portal\resources:

<?xml version="1.0"?>
<login/>

BUILDLOGIN.XSL in directory cocoon\portal\styles:

<xsl:param name="id"/>
<xsl:param name="password"/>
<xsl:template match="login">
<user>
<execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
<query>
SELECT id,password from USERS_TABLE where id = '<xsl:value-of
select="$id"/>' and password = '<xsl:value-of select="$password"/>'
</query>
</execute-query>
</user>
</xsl:template>
</xsl:stylesheet>

login form xsl:

<form action="{pipeline}" method="post">
Your Name/Id : <input type="text" name="{idfield}"/><br/>
Your Password: <input type="password" name="{passfield}"/> <p/>
<input type="submit" value="login"/>
</form>

Thanks for your help
Adam
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,054
Latest member
LucyCarper

Latest Threads

Top