cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "boessem" <phil...@boessem.de>
Subject AW: Problems using the <esql:error-results> tag
Date Tue, 03 Dec 2002 14:44:16 GMT
Hi,

Thank for answering.

totaly right. My problem in this case is, that i dont want the common
internal server error message, rather than my own, to explain what
mistake took place.

Here is my code, to give you a better idea of what I want. 

					<esql:execute-query>
						<esql:query>
								insert
								into
anmeldung
	
(studid,matr,vorname,name,email,id,klausur) 
								values 
	
('<xsp-request:get-parameter name="matr"/><xsp-request:get-parameter
name="id"/>','<xsp-request:get-parameter
name="matr"/>','<xsp-request:get-parameter
name="vorname"/>','<xsp-request:get-parameter
name="name"/>','<xsp-request:get-parameter
name="email"/>','<xsp-request:get-parameter
name="id"/>','<xsp-request:get-parameter name="fach"/>')	
							</esql:query>
						<esql:error-results>
							<error>An error
occurred</error>
						</esql:error-results>
					</esql:execute-query>

is there maybe something to change within the pipeling, or some where
else, or is my source code just wrong?

When I do it this way, there is still the same cocoon pre-set error
message.

-----Ursprüngliche Nachricht-----
Von: Olivier GUCKERT [mailto:Olivier.Guckert@inria.fr] 
Gesendet: Dienstag, 3. Dezember 2002 14:07
An: cocoon-users@xml.apache.org
Betreff: Re: Problems using the <esql:error-results> tag

> Hi,

 

> I am working on a simple online registration tool, to register for
exams. That for I have got a mysql database server, to >insert and read
the data.

 

> Within that database I have set a primary key that is made out of lets
say the studentid, and the id from the exam. I have > set it to primary
for the reason, that no double entry
> can be done.

 

> So if a student wants to register to one exam twice, there is an
exception saying, that there is a Duplicate entry for that > field. Now
instead of throwing out the exception within
> cocoon, I want to display something like, “an error occurs” instead”.
That for I used the tag <esql:error-results> to give a > different
message than that from cocoon.

If i understand tour problem, you just have to do :
<esql:error-results>
	<error>
		an error occurs
	</error>
</esql:error-results>


> Could anybody give me a hint how that could be done.

If it doesn't match, you just have to telle me more ...

Olivier GUCKERT

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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


Mime
View raw message