[JBoss Seam] - Error handling with error pages
by franky.b
Hi there,
my goal is to add a custom error page to an existing seam app which should display both the (technical) description of the error with <h:messages> and a short sentence that can be understand by a normal user (e.g. "connection to database failed. please try again later") and depends on what kind of error occured, of course.
This should be achived with a singe error page.
I am not able to change the code of the app, so I can not raise custom exceptions in my beans.
Therefore, I started with an entry in exceptions.xml, which redirects two exemplary kinds of errors that occur before render phase to my generic error page.
| <exception class="java.lang.RuntimeException">
| <redirect view-id="/genericError.xhtml">
| </redirect>
| </exception>
| <exception class="javax.servlet.ServletException">
| <redirect view-id="/genericError.xhtml"></redirect>
| </exception>-->
|
Well, now I can access the technical error message in genericError.xhtml with
<h:messages globalOnly="true" styleClass="message" />
But how can I detect because of which of the two exceptions the error page was displayed, so that I can show the correct textual message? Is there something like a global error object?
Or can I pass the desired message or the kind of exception to my genericError.xhtml in some way?
I tried <param ..> but I did not get it to work.
Thanks in advance,
Frank
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4126137#4126137
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4126137
18 years, 2 months
[JBossWS] - Re: NullPointerException from JBossXSEntityResolver
by kazcor
Hi,
no, unfortunately the workaround does not solve the issue. Using wsconsume to produce a WSDL from sources, afterwards doing wsprovide to generate sources from that WSDL, creating a dummy implementation for the generated interfaces and deploying all those classes on JBoss produces the very same error. I'm using JBossWS that comes with 4.2.2GA.
However, this webservice is only one part of a asynchronous pair of webservices for server<->server communications and the second webservice is using Axis on the remote side - so in the meantime I've already decided to stick to simple communications via strings, doing marshalling/unmarshalling with JAXB right before sending and after receiving.
I don't have time to further look into this, but anyways, I've uploaded the old WS contract produced by wsconsume right here (http://page.mi.fu-berlin.de/schmidtm/jbossws-jaxb/), so you may reproduce the error.
Thanks,
Max
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4126131#4126131
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4126131
18 years, 2 months
[JBoss Seam] - Login issue
by baspet
Hi,
i am facing a strange behaviour running the scenario below:
a) user supplied valid username - password and successfully logged in
b) press back button on browser
c) relogin supplying invalid username or password
d) successfully logs in!!
it seems that seam 'remembers' that user was already logged in and doesn't call authenticate method, allowing a non existing user to enter. Is that expected?
A workaround is to override org.jboss.seam.security.Identity.Identity and call login method as followes:
| @Name("org.jboss.seam.security.identity")
| @Scope(SESSION)
| @Install(precedence = APPLICATION)
| @BypassInterceptors
| @Startup
| public class AppIdentity extends Identity {
|
| @Override
| public String login() {
| unAuthenticate();
| return super.login();
| }
|
| }
|
|
I just wonder why unAuthenticate() is not called through Identity.login()
V.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4126129#4126129
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4126129
18 years, 2 months