473,383 Members | 1,859 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Authentication in Cocoon

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.SourceNotFoundExceptio n: 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
Jul 17 '05 #1
0 1761

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: MicFra | last post by:
hi, i got a little problem with pdf-serializing after updating from cocoon 2.1.2 to 2.1.4. following scenario: - using serializer org.apache.cocoon.serialization.FOPSerializer, with name...
1
by: Jawahar | last post by:
Hi All.. Currently in our application, we are using Serlvet as Controller,Jsp to View,BusinessLogic in EJB. We planned to implement Cocoon frame work in our existing application. Is this...
6
by: Jeremy | last post by:
My requirements are very simple: When a user browses to an XML document, the server should parse the document, apply its stylesheet, and spit the HTML at the client. Apache Cocoon is a slow,...
2
by: Gerald Aichholzer | last post by:
Hi NG, I have the following xml-file (simplified): <?xml version="1.0" encoding="ISO-8859-1"?> <dir:directory xmlns:dir="http://apache.org/cocoon/directory/2.0"> <dir:file...
0
by: Hugh Sparks | last post by:
If I configure and use two different fragment extractors on the same XML document, how can I write xslt template match patterns that distinguish which elements these fragments replaced? Details:...
0
by: mcv | last post by:
I'm currently learning to use Cocoon, and although I really like it, there are a couple of things that don't seem to be explained very well. I've seen lots of articles explaining really complicated...
0
by: Per-Christian Engdal | last post by:
Hi, I have built a cocoon.war file, and deployed it on my BEA Weblogic 8.1 Sp2 (Windows 2000) installation. The deployment works without exceptions, but when I try to access cocoon through...
2
by: rozwel | last post by:
Hi, I'm currently starting a CMS project based on XML-related technologies and I want to use an XML framework as the basis of my architecture. I found two open source project that could fit my...
3
by: Dennis Benzinger | last post by:
Hi! Is there a Python web publishing framework like Cocoon? I found Maki <http://maki.sourceforge.net/> but it was last updated in 2003 and its author says that he doesn't want to make another...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.