You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Taras Yurij Vasylovitch <ta...@softsky.com.ua> on 2006/03/14 16:35:56 UTC
Throw Exceptions from XSP to sitemap
Hi all.
I'm creating XSP page and using my own Java classes there. But if i try
to use some method, that throws exception, i receive an error:
org.apache.cocoon.components.language.LanguageException: Error compiling
homepage_xsp:
// start error (lines 131-131) "Unhandled exception type
InvalidLoginException"
User user = factory.getUser((String)session.getAttribute("login"));
// end error
and so on.
Java object method is declares as
public User getUser(String login) throws InvalidLoginException,
AlreadyNamedException, ApplicationException
I can use try..catch block to add an XML node with error, but I don't
want to handle this exceptions in this XSP, I want proceed it to
sitemap, where I have handle-exception pipeline.
Any ideas?
And one more question: I cant find java code, that is generated from my
XSP, as described in http://wiki.apache.org/cocoon/XSPFundamentals (I'm
running cocoon with Jetty). Where is it?
Thanks.
Regards.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Throw Exceptions from XSP to sitemap
Posted by Taras Yurij Vasylovitch <ta...@softsky.com.ua>.
On Tue, 2006-03-14 at 17:35 +0200, Taras Yurij Vasylovitch wrote:
> Hi all.
> I'm creating XSP page and using my own Java classes there. But if i try
> to use some method, that throws exception, i receive an error:
>
> org.apache.cocoon.components.language.LanguageException: Error compiling
> homepage_xsp:
>
> // start error (lines 131-131) "Unhandled exception type
> InvalidLoginException"
> User user = factory.getUser((String)session.getAttribute("login"));
>
> // end error
>
> and so on.
>
> Java object method is declares as
>
> public User getUser(String login) throws InvalidLoginException,
> AlreadyNamedException, ApplicationException
>
> I can use try..catch block to add an XML node with error, but I don't
> want to handle this exceptions in this XSP, I want proceed it to
> sitemap, where I have handle-exception pipeline.
> Any ideas?
>
> And one more question: I cant find java code, that is generated from my
> XSP, as described in http://wiki.apache.org/cocoon/XSPFundamentals (I'm
> running cocoon with Jetty). Where is it?
>
> Thanks.
>
> Regards.
Impossible?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org