Re: How to get Exception info when I use global exception mappings?

2007-05-21 Thread Roger Varley


Thanks for your help, I got it.



As an aside, it may be worth pointing out that exposing your users to
a detailed StackTrace is not usually considered to be a good idea.
Firstly, a stack trace means nothing to your users and may actually
intimidate them, and secondly, if your application is web facing (as
opposed to an intranet) then you are probably revealing too much
information about your system and it's set up.

Regards
Roger

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



How to get Exception info when I use global exception mappings?

2007-05-19 Thread kongxx

I use global-exception-mappings to catch global exception in my project.
for example, in my struts config file, I use following to handle exception
global-results
result 
name=unhandledException/common/exception.jsp/result
result 
name=myexception/common/myexception.jsp/result
/global-results

global-exception-mappings
exception-mapping exception=java.lang.Exception
result=unhandledException/
exception-mapping exception=xxx.MyException
result=myexception/
/global-exception-mappings
Here, it can redirect to error page when some exception occures. 
My question is: how can I get the exception info in the jsp page? For
example, I hope display the exception message or exception stack in the jsp
page.
-- 
View this message in context: 
http://www.nabble.com/How-to-get-Exception-info-when-I-use-global-exception-mappings--tf3781586.html#a10694515
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: How to get Exception info when I use global exception mappings?

2007-05-19 Thread Kristian Duske

Hi,


Here, it can redirect to error page when some exception occures.
My question is: how can I get the exception info in the jsp page? For
example, I hope display the exception message or exception stack in  
the jsp

page.


See here:
http://struts.apache.org/2.0.6/docs/exception-interceptor.html

It's on the value stack, wrapped in an instance of ExceptionHolder.

Regards
Kristian



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



Re: How to get Exception info when I use global exception mappings?

2007-05-19 Thread Guillaume Carré

2007/5/19, Kristian Duske [EMAIL PROTECTED]:

See here:
http://struts.apache.org/2.0.6/docs/exception-interceptor.html

It's on the value stack, wrapped in an instance of ExceptionHolder.


and see here too:

http://struts.apache.org/2.x/docs/exception-configuration.html
--
Guillaume Carré

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



Re: How to get Exception info when I use global exception mappings?

2007-05-19 Thread kongxx

Thanks for your help, I got it.


Guillaume Carré wrote:
 
 2007/5/19, Kristian Duske [EMAIL PROTECTED]:
 See here:
 http://struts.apache.org/2.0.6/docs/exception-interceptor.html

 It's on the value stack, wrapped in an instance of ExceptionHolder.
 
 and see here too:
 
 http://struts.apache.org/2.x/docs/exception-configuration.html
 -- 
 Guillaume Carré
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-get-Exception-info-when-I-use-global-exception-mappings--tf3781586.html#a10702235
Sent from the Struts - User mailing list archive at Nabble.com.


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