aspose file tools*
The moose likes Struts and the fly likes configuring global exception page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "configuring global exception page" Watch "configuring global exception page" New topic
Author

configuring global exception page

James Peter
Ranch Hand

Joined: Sep 15, 2010
Posts: 115
hi all,

my structs.xml is



if i throw the exception


I am getting below error instead of showing my run-time-exception.jsp.


even i tried with


Please let me know where i am doing wrong.

Rgds
Peter
Jesus Mireles
Ranch Hand

Joined: Mar 10, 2010
Posts: 122

Is this your just sections of your struts.xml? I assume so because you did not provide the action mapping ... the only reason this would not work I think would be because you may have a mapping to RunTimeException configured in the action. So something like:



When this happens you'll get the locally defined result ignoring the global defined result. Overall it looks correct if those files are where you say they are.

James Peter
Ranch Hand

Joined: Sep 15, 2010
Posts: 115
hi,

within below action i am creating runtimeexception.




i provided complete content of struts.xml

i am calling action from jsp



Rgds
Peter

Jesus Mireles
Ranch Hand

Joined: Mar 10, 2010
Posts: 122

Well since the struts.xml file looks correct my only guess left would be are you 100% that the struts.xml file is getting deployed correctly. Let me know what the reason was once you find it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: configuring global exception page
 
Similar Threads
Struts 2: error on adding <global-exception-mappings> tag to struts.xml
Strut2 exception handling
Issue configuring global results
Error in building an application using Struts2
Custom result type reference is causing my deploy to fail