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">
<maparameter name="use-request-parameters" value="true"/>
</map:transform>
<map:transform type="sql">
<maparameter 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:
<xslaram name="id"/>
<xslaram 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
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">
<maparameter name="use-request-parameters" value="true"/>
</map:transform>
<map:transform type="sql">
<maparameter 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:
<xslaram name="id"/>
<xslaram 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