Sorry to anwswer so much time after your post. 
But I'm not sure I understand your point.

What i try to say my jsp does not catch the exception with the tag
<html:errors/>. whereas the eception is defined as global in
struts-config.xml :

<exception key="global.error.invalid_authentication"            
    path="authenticationLayout"         
    scope="request"
        type="com.equant.ref_ce.module.InvalidAuthenticationException">
</exception>  

*It works with the errors added in my associated Form validate method
with :
 errors.add(ActionErrors.GLOBAL_ERROR, newError);

*It doesn't when an exception comes from associated Action execute?
(Except if i gather my tiles element in one single JSP ...)

*So i try to proceed with adding errors associated Action execute and
forcing a return to my input with :

return (mapping.getInputForward())

This creates the following exception :
java.lang.IllegalArgumentException: Le chemin authenticationFormLayout
ne commence pas par le caractère "/"
(sorry to be french. It means that path authenticationFormLayout doesn't
start with "/". Of course, it is my tile layout input in my action
mapping) ?

*Last thing i've tried is just forwarding my request with its errors
to :
<forward name="failure" path="/action/authenticationProcess"
redirect="true"/>
with this piece of code :
forward = mapping.findForward(InternalConstants.FAILURE_KEY); 
In fact, it displays my JSP with all the errors raised in the validate
method (because the fields have been rested?) but none from the execute.

Here is my ation mapping :

<action path="/authenticationProcess"     
type="com.equant.ref_ce.action.AuthenticationAction 
name="authenticationForm" 
  input="authenticationFormLayout"         
  scope="request"
  validate="true">
   <forward name="success" path="/action/menuView" />
   <forward name="failure" path="/action/authenticationProcess"
redirect="true"/>     
</action>


As you can read, it is a bit fuzzy for me. But i'm sure this has been
already done successfully thousand times. 

Still need help,


liooil,

At 2:25 PM +0000 10/22/04, liooil   wrote:
>And i'm not sure to understand why the jsp catch the exception (my
>pretty error appears in the rendered html page) and the tiles element
>does not (the whole body is blank).
>
>Is there a soul to explain that to me?
>What about a work-around?

I'm not sure I understand - there's no reason your JSP should catch 
the exception unless you have handling for that in the JSP - in which 
case, you shouldn't be surprised!  :)

But if you don't have error handling in the tile itself (for example, 
a JSTL c:catch tag), then an exception in there will be thrown.

What I find somewhat annoying is that Global Exception handlers can't 
function effectively to catch tiles JSP errors, because the 
HttpServletResponse has already been committed by the time the 
exception is thrown.  I'd like to figure out a good fallback strategy 
inside the Global Exception Handler for when response.isCommitted() 
is true.  I've tried a few things, but nothing so far that I'd 
consider making part of the Struts core.

In the meantime, c:catch is probably the best solution.

Joe

--
Joe Germuska            
[EMAIL PROTECTED]  
http://blog.germuska.com    
"In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn 
back; I'll know I'm in the wrong place."
    - Carlos Santana

 ___[ Pub ]____________________________________________________________
Envie de discuter gratuitement avec vos amis ?
Téléchargez Yahoo! Messenger http://yahoo.ifrance.com

___[ Pub ]____________________________________________________________
Inscrivez-vous gratuitement sur Tandaime, Le site de rencontres !
http://rencontre.rencontres.com/index.php?origine=4


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to