Error Message on Redirect

Hi all,
I have configured an error page in web.xml when an error occurs -
e.g. the file size limit exceeded.
This is a plain html page as I have not found a way to use a jsp.
Is it possible to give a detail error message? I want an error
page similar to the ExceptionHandler page, but without stack
traces .. I want to access the source of the error and give the user
a hint.
Thanks for any help,
Heike

To use a jsp file as an error page, you can include the following directive in a jsp file:
<%@ page errorPage="MyErrorPage.jsp" %>Whenever an exception occurs in the jsp file, the control will then be transferred to MyErrorPage.jsp.
MyErrorPage.jsp should have the following directive at the top:
<%@ page isErrorPage="true" %>If a jsp's iserrorpage is true, then it gets access to an implicit variable called 'exception'. You can therefore do something like the following in MyErrorPage.jsp:
     <%= exception.toString() %>

Similar Messages

  • Error Messages after redirect

    Hey all,
    I am trying to use the the addMessage of the faces context to display some error messages that happen during my business logic exec. phase, but i can't seem to get it to work.
    Heres the scenario.
    I have a page that lists all the users in my app, and another that allows to add/edit/delete a user.
    I got the addMessage to work when add/edit/delete errors occur where the user will return tto the add/edit/delete page and a message is displayed.
    But now when those actions succeed i want to user to go back to the users listing page and display a message like.. user added succfully or somthing.
    how could I do that... is it possible using addMessage, ???

    Hello,
    You can use following phase listener to achieve what you want. Just place phase listener definition in your faces-config.xml. Many thanks to Jesse Wilson for original idea.
         <lifecycle>
              <phase-listener>yourpackage.MessageHandler</phase-listener>
         </lifecycle>
    MessageHandler.java:
    package yourpackage;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.util.Iterator;
    import javax.faces.event.PhaseListener;
    import javax.faces.event.PhaseId;
    import javax.faces.event.PhaseEvent;
    import javax.faces.context.FacesContext;
    import javax.faces.application.FacesMessage;
    * Enables messages to be rendered on different pages from which they were set.
    * To produce this behaviour, this class acts as a <code>PhaseListener</code>.
    * This is performed by moving the FacesMessage objects:
    * <li>After each phase where messages may be added, this moves the messages from
    * the page-scoped FacesContext to the session-scoped session map.
    * <li>Before messages are rendered, this moves the messages from the session-scoped
    * session map back to the page-scoped FacesContext.
    * Only messages that are not associated with a particular component are ever
    * moved. These are the only messages that can be rendered on a page that is different
    * from where they originated.
    * To enable this behaviour, add a <code>lifecycle</code> block to your
    * faces-config.xml file. That block should contain a single <code>phase-listener</code>
    * block containing the fully-qualified classname of this file.
    * @author Jesse Wilson
    public class MessageHandler implements PhaseListener {
         * a name to save messages in the session under
         private static final String sessionToken = "MULTI_PAGE_MESSAGES_SUPPORT";
         * Return the identifier of the request processing phase during which this
         * listener is interested in processing PhaseEvent events.
         public PhaseId getPhaseId() {
              return PhaseId.ANY_PHASE;
         * Handle a notification that the processing for a particular phase of the
         * request processing lifecycle is about to begin.
         public void beforePhase(PhaseEvent event) {
              if(event.getPhaseId() == PhaseId.RENDER_RESPONSE) {
                   FacesContext facesContext = event.getFacesContext();
                   restoreMessages(facesContext);
         * Handle a notification that the processing for a particular phase has just
         * been completed.
         public void afterPhase(PhaseEvent event) {
              if(event.getPhaseId() == PhaseId.APPLY_REQUEST_VALUES ||
              event.getPhaseId() == PhaseId.PROCESS_VALIDATIONS ||
              event.getPhaseId() == PhaseId.INVOKE_APPLICATION) {
                   FacesContext facesContext = event.getFacesContext();
                   saveMessages(facesContext);
         * Remove the messages that are not associated with any particular component
         * from the faces context and store them to the user's session.
         * @return the number of removed messages.
         private int saveMessages(FacesContext facesContext) {
              // remove messages from the context
              List messages = new ArrayList();
              for(Iterator i = facesContext.getMessages(null); i.hasNext(); ) {
                   messages.add(i.next());
                   i.remove();
              // store them in the session
              if(messages.size() == 0) {
                   return 0;
              Map sessionMap = facesContext.getExternalContext().getSessionMap();
              // if there already are messages
              List existingMessages = (List)sessionMap.get(sessionToken);
              if(existingMessages != null) {
                   existingMessages.addAll(messages);
              else {
                   sessionMap.put(sessionToken, messages); // if these are the first messages
              return messages.size();
         * Remove the messages that are not associated with any particular component
         * from the user's session and add them to the faces context.
         * @return the number of removed messages.
         private int restoreMessages(FacesContext facesContext) {
              // remove messages from the session
              Map sessionMap = facesContext.getExternalContext().getSessionMap();
              List messages = (List)sessionMap.remove(sessionToken);
              // store them in the context
              if(messages == null) {
                   return 0;
              int restoredCount = messages.size();
              for(Iterator i = messages.iterator(); i.hasNext(); ) {
                   facesContext.addMessage(null, (FacesMessage)i.next());
              return restoredCount;
    }

  • Error message says redirecting to never ending loop may be due to refusal to accept cookies. How do I fix it?

    I was trying to sign into Netflex. I entered all info and then enter, but got a message something to the effect that Firefox was redirecting my attempt in ways that would never complete. Suggested that it might me due to refusal to accept cookies. I remember yesterday it had asked to allow a cookie from somewhere but said I already had many cookies from them, so I clicked on disallow.

    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    * Firefox > Preferences > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove Cookies" from sites causing problems:
    * Firefox > Preferences > Privacy > Cookies: "Show Cookies"
    If clearing the cookies doesn't help then it is possible that the file <i>cookies.sqlite</i> that stores the cookies is corrupted.<br />
    Rename (or delete) <b>cookies.sqlite</b> (cookies.sqlite.old) and delete <b>cookies.sqlite-journal</b> and <b>cookies.txt</b>, if they exist, in the Firefox Profile Folder in case the file cookies.sqlite got corrupted.<br />
    * http://kb.mozillazine.org/Profile_folder_-_Firefox<br />

  • I keep getting an error message and redirected to yahoo, despite having been in the site briefly using my default browser. any ideas?

    Google is my default browser. I type in a search, click on the link, and go to the site, Sometimes I get re-directed immediately and other times I am able to navigate for a few seconds before being re-directed. I've tried changing the settings in the "about.config" area to make sure that Google does not appear anywhere. I've removed Yahoo from my applications (since doing that Bing now comes up anytime I open more than one browser window). I've looked for malware from Spigot and I can't find You Tube Downloader. In short, I've followed every suggestion that I can find. It hasn't fixed the problem, and has created a new one with Bing. Any other ideas??

    It could be the work of one of your add-ons, or even add / mal-ware.
    Look thru your add-ons list and make sure you know what each one is
    and what it does. Also, check the programs that are on your computer
    '''Windows:''' Start > Control Panel > Uninstall Programs.
    '''Mac:''' Open the "Applications" folder
    '''Linux:'''
    * [http://www.freesoftwaremagazine.com/articles/see_all_your_installed_applications_ubuntu_unity Ubuntu Unity]''' {web link}
    * Xfce: Applications Menu category sections
    * options depends on the package manager and the desktop environment
    Go thru the list. If you find something that you don't
    know what it is, use a web search.
    '''[https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-caused-malware Troubleshoot Firefox Issues Caused By Malware]''' {web link}

  • Global Error Message Trapping

    I would like to be able to trap an unexpected error at the application level and redirect the user to another page.
    We are performing SQL Injection testing and are security analysts are able to inject text, for example in the source SQL for a region, that causes an unexpected database error. I would like to trap any ORA type error message and redirect the user. I have not been able to determine if there is a field/object/etc where the message is stored. If I knew that, I was hoping ot build an application process that could check for an error and if present, peform the redirect.
    Any help would be appreciated.

    Roel -
    We found another article doing something similar to your solution but more simplistic. This is working for me. I modified the Javascript to look only for 'ORA-' messages and redirect to another page.
    http://www.apex-blog.com/oracle-apex/capturing-custom-error-messages-from-database-triggers-21.html
    This solution does not seem to work in trapping errors for the interactive report pages. Is there a different template used for these pages?
    Thanks again.

  • In safari, On my Ipad2,I get the error message, "too may redirects" and the page won't load. Anyone with advice? I have cleared the cache, cookies, and history and restarted.

    In safari, on my Ipad2, I get the error message " too many redirects" and the page won't load. I have cleared the cache, cookies, and history and have rebooted and I still get the same problem. Any advice?

    In safari, on my Ipad2, I get the error message " too many redirects" and the page won't load. I have cleared the cache, cookies, and history and have rebooted and I still get the same problem. Any advice?

  • Without any prompt from me, Firefox is continually redirecting itself and displaying a 404 Error message. What can I do to correct this?

    Upon laptop start-up, with Firefox as my web browser, I generally visit news sites beginning with with CNN. Aside from updating Adobe Acrobat Reader to the X version, I have not added anything to my laptop (A Sony Vaio A/W series 64 bit operating with Windows 7) recently, but I am continuously being redirected via the 404 error message without clicking or while reading an article. Firefox has also been crashing daily despite efforts to keep the cache clean and a minimum of programs running during use. I use Norton 360 for antivirus protection and update daily and have not found any bugs to suggest adware or malware. I do have Chrome loaded as a secondary browser, but Firefox has been my browser of choice until recently. Help.

    Hello WhiteDove2043, try to UNCHECK the '''Warn me when websites try to redirect or reload the page''', go from : Tools > Options > Advanced > General tab > Accessibility > Warn me when websites try to redirect or reload the page [ ]. Don't forget to click OK to save it.
    see for more info : [https://support.mozilla.org/en-US/kb/advanced-settings-browsing-network-updates-encryption#w_accessibility Accessibility]
    thank you

  • TS3320 "too many redirect occurred" error message on iPad using a bookmark

    I get the error message "too many redirect occurred" when using a bookmark to connect to a site. Safari is disabled in settings. This worked fine for about 5 months. Recently it stopped working. Now the site will only open going straight through Safari. (The error still appears using the book mark with Safari enabled). Cookies are enabled and are cleared off.
    Any ideas on how to get around this?
    Thanks

    Because its an issue with the site programming.  It can be due to some cookie or cache on your iPad, but its the actual website that tells the iPad to redirect.
    Imagine if you go the store with a coupon you clipped off of a newspaper. when you get to the door, you show the coupon and the guy at the door says you need to use the other door because the coupon says so.   So you walk to the other door, and the guy at that door tells you nope, for that type of product you need to go to the original door.  So you go back and the cycle repeats.
    Eventually you give up and leave, same thing happens with the iPad after so many tries going back and forth between pages or if sent to enough different pages it will just give up since it just can't access anything as it keeps being sent elsewhere.
    If its due to Cookies or corrupted cache you can go into Settings->Safari and clear Cookies and history to see if that fixes it.
    Otherwise its usually some type of loop being generated by untested conditions in the web page coding, and only the Website owners / programmers can fix it.
    Most often its caused by a website sending you to the mobile version of the site, and the mobile version detecting an iPad sends you back to the desktop version of the site, and the cycle repeats there.

  • TS3899 when I try to send a email I get a error message that my sever would not allow redirected emails

    What to do about error message your server is not able to redirect mail

    iOS: Unable to send or receive email
    http://support.apple.com/kb/TS3899
    Can’t Send Emails on iPad – Troubleshooting Steps
    http://ipadhelp.com/ipad-help/ipad-cant-send-emails-troubleshooting-steps/
    Setting up and troubleshooting Mail
    http://www.apple.com/support/ipad/assistant/mail/
    Using a POP account with multiple devices
    http://support.apple.com/kb/ht3228
    iOS: Adding an email account
    http://support.apple.com/kb/HT4810
    iOS: Setting up an Outlook.com, Hotmail, Live, or MSN email account
    http://support.apple.com/kb/ht1694
    iPhone, iPad, iPod touch: Microsoft Outlook 2003, Outlook 2007, Outlook 2010 may not display contacts and calendars after sync
    http://support.apple.com/kb/TS1944
    Server does not allow relaying email error, fix
    http://appletoolbox.com/2012/01/server-does-not-allow-relaying-email-error-fix/
    Why Does My iPad Say “Cannot Connect to Server”?
    http://www.ehow.co.uk/info_8693415_ipad-say-cannot-connect-server.html
    How to Delete Email on the iPad
    http://ipad.about.com/od/iPad_Guide/ss/How-To-Delete-Email-On-The-Ipad.htm
    How to Mass Delete Emails from iPhone and iPad Inbox (with video)
    http://suiteminute.com/how-to-mass-delete-emails-from-iphone-and-ipad-inbox/
    How to add, send and open iPad email attachments
    http://www.iskysoft.com/apple-ipad/ipad-email-attachments.html
    How to Sync Contacts with Your iPad Using iTunes
    http://www.dummies.com/how-to/content/how-to-sync-contacts-with-your-ipad-using- itunes.html
    iOS: ‘Mailbox Locked’, account is in use on another device, or prompt to re-enter POP3 password
    http://support.apple.com/kb/ts2621
    iCloud: Create a group and add contacts to it
    http://support.apple.com/kb/PH2667
    eMail Groups - You can use a third party app that many users recommend.
    MailShot -  https://itunes.apple.com/us/app/mailshot-pro-group-email-done/id445996226?mt=8
    Group Email -  https://itunes.apple.com/us/app/mailshot-pro-group-email-done/id445996226?mt=8
    iPad Mail
    http://www.apple.com/support/ipad/mail/
    Configuration problems with IMAP e-mail on iOS with a non-standard SSL port.
    http://colinrobbins.me/2013/02/09/configuration-problems-with-imap-e-mail-on-ios -with-a-non-standard-ssl-port/
    Try this first - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.)
    Or this - Delete the account in Mail and then set it up again. Settings->Mail, Contacts, Calendars -> Accounts   Tap on the Account, then on the red button that says Remove Account.
    How to delete an email account on your iPad
    http://www.shoppepro.com/support/knowledgebase/228/How-to-delete-an-email-accoun t-on-your-iPad.html
     Cheers, Tom 

  • Please help!..redirecting error messages

    I'm developing an application and I wish to redirect all error messages to a separate .txt file. Is this possible??
    This is very urgent, if anyone can help!
    Thanks.

    String sSysLog = "MySystemLogFile.txt";
    PrintStream stream = new PrintStream(new FileOutputStream(sSysLog, true), true);
    System.setErr(stream);     // Set System.err to output to specified log file.

  • Calendar in gmail now refuses to open and I get an error message saying the page isn't redirecting properly and that Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

    The error message suggests that this problem can sometimes be caused by disabling or refusing to accept cookies, yet cookies are enabled.
    I want to import my calendar from Outlook but I can't even open the exisiting calendar I have already set up in associaion with my gmail account

    This issue can be caused by corrupted cookies.
    Clear the cache and the cookies from sites that cause problems.
    * "Clear the Cache": Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    * "Remove the Cookies" from sites causing problems: Tools > Options > Privacy > Cookies: "Show Cookies"
    * http://kb.mozillazine.org/The_page_is_not_redirecting_properly

  • When going from Gmail to google calendar I get an error message that the google is asking for a redirect that cannot complete. This works fine in IE, but not my beloved Firefox. I have the default cookie settings still in place

    When looking at my gmail, I want to open google calendar, but get the above error message. Cookies are enabled, default settings are still I place. This works fine when I use IE. HELP!

    This issue can be caused by corrupted cookies.
    Clear the cache and the cookies from sites that cause problems.
    * "Clear the Cache": Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    * "Remove the Cookies" from sites causing problems: Tools > Options > Privacy > Cookies: "Show Cookies"
    * http://kb.mozillazine.org/The_page_is_not_redirecting_properly

  • Redirecting error message on SQL Plus

    When using SQL Plus, is there a way to send error messages to my c:\ drive vs. the server?

    Hi grama16,
    From what I've noticed, that error message shows up sometimes for ink or printhead issues. Please follow as many steps as you can in the guide below, it should help fix the issue for your printer
    'Ink System Failure' or a '0x ...' Error Message Displays on the Control Panel
    *** If my reply was helpful, please click on the "Kudos Thumbs-Up" on the right, as a way to say "Thanks!".
    If this reply also fixed your issue - please click the "Accept as Solution" button, so that others can find the same answer. ***

  • How to get rid of sync error message

    Hello,
    When I first installed CC on my computer, our company's proxy was refusing the connections to the Adobe cloud servers and I couldn't sync my test file "test.indd".
    From that moment I'm getting the "unable to sync "test.indd" due to server error" message.
    After having determinated all the server ips that Adobe uses in the Amazon cloud and added manually the exeptions to our proxy server, syncing files finally worked. Great thanks to Adobe for not giving the server ips out and not helping at all.
    Syncing files now works but I keep receiving the "unable to sync "test.indd" due to server error" message.
    I have tried to recreate the file with the exact filename and sync it again but that doesn't solve my problem.
    As a paying customer (7 x CC for teams licences) I contacted the Adobe support and they told me that they don't do any support for server problems !???!!!!! and redirected me to this forum page http://helpx.adobe.com/creative-cloud/kb/arent-my-files-syncing.html which has nothing to do with my problem. Can't find any words to describe that customer support...
    Maybe there is someone in this community willing to do the job of Adobe support and help me?

    Thanks for your reply Mylenium,
    Sorry I forgot to mention my system: Windows 7 Pro 64Bit SP1.
    In C:\users\You\AppData\Roaming I find many cache related files, but only a few that are not related to any specific CC app:
    C:\Users\***\AppData\Roaming\Adobe\CEPServiceManager4\cache\ExtensionManifest
    C:\Users\***\AppData\Roaming\Adobe\Common\Media Cache
    C:\Users\***\AppData\Roaming\Adobe\Common\Media Cache Files
    I have backuped those files, removed from their respective folders and restarted the CC Desktop app but the message is still popping up.
    Does anyone know in which file(s) the sync cache is stored exactly? I can't find any information about that on the net nor forum.

  • How to create Custom error message in SharePoint 2013

    Hi,
    I have created one document library.On uploading the same file SharePoint throws error as"server error.The same file exit".
    But my requirement is not to show the SharePoint default message.I wanted to create custom message and show the pop up for the same file upload.
    Is there any way to create any custom error page or can I manipulate SharePoint default error page?
    Any help?
    Thank you

    Hi,
    You can create an event receiver to set the validation error messages.  One such post to redirect the custom error page is as follows
    https://social.msdn.microsoft.com/Forums/office/en-US/2bc851f6-e04b-4550-b87f-9b874a290482/sharepoint-event-receivers-and-custom-error-messages?forum=sharepointdevelopmentlegacy
    Create custom error page for SharePoint event receiver
    Please mark it answered, if your problem resolved or helpful.

Maybe you are looking for

  • How secure is Internet shopping with ipad mini

    How secure is Internet shopping with ipad mini

  • Mass sale of asset using t code.abaon.

    Hi All Mass sale of asset using t code.abaon *After there is a difference between area 63 Asset history sheet and the Account balance list which wasn't their prior to this sale. The difference is between summarizing all of the dep. columns and compar

  • Always plays the same song

    When I want to listen to one of my play list (on shuffle or not) it always plays the same song over and over and does not go to the next song in the list. I tried re-initiating my ITouch but it has not solved the problem. I also downloadeded the 3.o

  • Hide icons in applications menu

    I am having the problem that the Applications "menu", in grid mode, on the dock is getting stuffed with lots of things I almost or never need. That, I could accept. But when you are forced to for example install Microsoft Silverlight, the installer p

  • " Use the purchases page to try again " This error is coming again and again :(

    I'm getting this error again and again. I tried downloading many apps like Reeders and Mixtab. Please let me know how to fix it. i'm totally noob in Macbook. Thanks