Would like to redirect page

Hi All,
First, I'm not a java programmer at all...
Okay.. I have this portal with an ExceptionHelper.java file and instead of displaying this page to the user, I'd like to redirect the page to an HTML page, perhaps carrying a variable for the error with it.
I've tried: response.sendRedirect(response.encodeRedirectURL('http://dev.sheridan.edu/uportal/errors/') ); to no avail.. maybe I just put it in the wrong place in the code? line 344
* Copyright � 2001 The JA-SIG Collaborative.  All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
*    notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
*    notice, this list of conditions and the following disclaimer in
*    the documentation and/or other materials provided with the
*    distribution.
* 3. Redistributions of any form whatsoever must retain the following
*    acknowledgment:
*    "This product includes software developed by the JA-SIG Collaborative
*    (http://www.jasig.org/)."
* THIS SOFTWARE IS PROVIDED BY THE JA-SIG COLLABORATIVE "AS IS" AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE JA-SIG COLLABORATIVE OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
package org.jasig.portal;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
public class ExceptionHelper {
    private static final Log log = LogFactory.getLog(ExceptionHelper.class);
    // List of strings to match in traceback for various containers
     // This array must be expanded as additional Application Server
     // containers become better known
    public static final String boundaries[] =
              "at javax.servlet.http.HttpServlet."
     * Generate traceback only to the Servlet-container interface.
     * @param ex any throwable exception
     * @return stack trace string without container layers
    public static String shortStackTrace(Throwable ex) {
         if (ex == null)
              return "";
        java.io.StringWriter sw = new java.io.StringWriter();
        ex.printStackTrace(new java.io.PrintWriter(sw));
        sw.flush();
        String stktr = sw.toString();
        return trimStackTrace(stktr);
     * Trims a String representation of a Stack Trace to remove
     * the portion of the trace that is in the servlet container layer.
     * @param stackTrace - String result of printStackTrace
     * @return the stack trace with portions of the trace that dive into the container
     * layer removed.
    static String trimStackTrace(String stackTrace) {
        StringBuffer trimmedTrace = new StringBuffer();
        // a List of Strings to be trimmed and appended to the buffer
        // these represent elements in the causal chain
        List fragments = new ArrayList();
        int causeCut = (stackTrace.indexOf("Caused by"));
        if (causeCut > 0) {
            // there are one or more Caused by fragments to consider
            // we traverse stackTrace, parsing out fragments for later processing
            // and updating stackTrace to contain the remaining unparsed portion
            // as we go
            while (stackTrace.length() > 0) {
                if (stackTrace.startsWith("Caused by")){
                    // don't count the "Caused by" leading the stackTrace
                    causeCut = stackTrace.substring(9).indexOf("Caused by");
                    if (causeCut > 0)
                        causeCut += 9;
                } else {
                    causeCut = stackTrace.indexOf("Caused by");
                if (causeCut > -1) {
                    // stackTrace currently includes multiple fragments
                    // parse out the first and leave the rest for next iteration
                    fragments.add(stackTrace.substring(0, causeCut));
                    stackTrace = stackTrace.substring(causeCut);
                } else {
                    // stackTrace currently is a bare fragment
                    // grab it
                    fragments.add(stackTrace);
                    stackTrace = "";
        } else {
            // there's ony a single Throwable in the chain
            fragments.add(stackTrace);
        // now that we have fragments to consider
        for (Iterator iter = fragments.iterator(); iter.hasNext();){
            String consideredFragment = (String) iter.next();
            // flag to indicate that a trimmed form of this fragment has been appended
            // to the trimmed stack trace buffer
            boolean appended = false;
            for (int i=0; i < boundaries.length; i++) {
                int cut = consideredFragment.indexOf(boundaries);
if (cut > 0) {
// stack trace includes a trace through our container
// in which we are not interested: trim it.
// grab the desired portion up to the boundary
trimmedTrace.append(consideredFragment.substring(0, cut).trim());
trimmedTrace.append("\n");
appended = true;
break;
if (! appended) {
// a trimmed version of this fragment was not appended
// because it doesn't need to be trimmed -- append the whole thing.
trimmedTrace.append(consideredFragment.trim());
trimmedTrace.append("\n");
return trimmedTrace.toString();
* Generic Exception Handler called from catch clause
* @param eid the ErrorID (as seen from catch)
* @param parm
* @param ex the Exception caught
* @throws PortalException
public static void genericHandler(ErrorID eid, String parm, Throwable ex)
throws PortalException {
// *** Handle PortalExceptions ***
     // Log it if logging was deferred in .signal() call
     // Rethrow it
if (ex instanceof PortalException) {
     if (((PortalException)ex).isLogPending())
          traceToLog(eid,parm,ex);
               throw (PortalException) ex;
// *** Handle all other Exceptions ***
// Log the message and traceback
traceToLog(eid, parm, ex);
// Create a derived PortalException chained to this
PortalException nex;
if (ex instanceof Exception) {
nex = new PortalException(eid, (Exception) ex);
} else {
     // Sorry, at this point PortalExceptions don't chain to
     // non-Exception subclasses of Throwable
nex = new PortalException(eid);
nex.setLogPending(false);
ProblemsTable.store(nex);
throw nex;
     public static void genericHandler(ErrorID eid, Throwable ex)
          throws PortalException {
               genericHandler(eid,null,ex);
     * Create PortalException from ErrorID and throw it. Maybe trace it.
     * @param eid ErrorId
     * @param parm Additional error information
     * @param tracenow Trace now or defer till first catch.
     * @throws PortalException
public static void signal(ErrorID eid, String parm, boolean tracenow)
throws PortalException {
PortalException nex = new PortalException(eid);
          nex.setParameter(parm);
signal(nex,tracenow);
* Create PortalException from Errorid, trace, and throw it.
* @param eid ErrorID to use to generate PortalException
* @param parm Additional error information
* @throws PortalException
public static void signal(ErrorID eid, String parm) throws PortalException {
     signal(eid,parm,true);
* Throw PortalException provided by caller, maybe trace it.
* @param nex Exception provided by caller
* @param tracenow Trace now, or later after first catch.
* @throws PortalException
private static void signal(PortalException nex, boolean tracenow)
throws PortalException {
if (tracenow) {
     traceToLog(nex.getErrorID(), nex.getParameter(), nex);
     ProblemsTable.store(nex);
throw nex;
* Generate, trace, and throw Portal Exception given ErrorID.
* @param eid ErrorID
* @throws PortalException
public static void signal(ErrorID eid)
     throws PortalException {
     signal(eid,null,true);
* Common logic for generating log entry of errors
* @param eid ErrorID with initial message
* @param parm Parameter string to append to eid msg
* @param ex Old exception
private static void traceToLog(ErrorID eid, String parm, Throwable ex) {
     if (ex !=null &&
          ex instanceof PortalException) {
               if (!((PortalException)ex).isLogPending())
                    return; // This PortalException was already logged.
               else
                    ((PortalException)ex).setLogPending(false);
String logmsg = errorInfo(eid, parm, ex);
log.error( logmsg);
* Generate error string for logging or /problems online display
* @param eid Error ID
* @param parm Parameter string
* @param ex Exception
* @return Multiline text with message and traceback
public static String errorInfo(ErrorID eid, String parm, Throwable ex) {
          StringBuffer errorinfobuffer = new StringBuffer(1000);
          if (eid!=Errors.legacy)
     errorinfobuffer.append(eid.getMessage()); // Error ID message
else
     errorinfobuffer.append(ex.getMessage());
          if (parm != null) { // Parameter data
               errorinfobuffer.append("\n [specific data: ");
               errorinfobuffer.append(parm);
               errorinfobuffer.append("] ");
          errorinfobuffer.append("\n");
          if (ex!=null)
               errorinfobuffer.append(shortStackTrace(ex)); // Stack trace
          return errorinfobuffer.toString();
* Generic Top-Level Exception Handler caled from catch clause
* (doesn't rethrow exception)
* @param eid Error ID
* @param parm Parameter string
* @param ex Exception caught
public static void genericTopHandler(ErrorID eid, String parm, Throwable ex) {
// If this is an already logged Portal Exception, we are done
if (ex instanceof PortalException &&
     !((PortalException)ex).isLogPending()) {
     return;
traceToLog(eid, parm, ex);
if (ex instanceof PortalException) // already in the table
     return;
          // Create a derived PortalException (just for Problems Table)
          PortalException nex=null;
          if (ex instanceof Exception)
               nex = new PortalException(eid, (Exception) ex);
          else
               nex = new PortalException(eid);
          ProblemsTable.store(nex);
     public static void genericTopHandler(ErrorID eid, Throwable ex) {
          genericTopHandler(eid, null, ex);
* Generate HTML page to send to end user after fatal error
* @param resp Servlet response object
* @param e PortalException received at Servlet code.
     response.sendRedirect(response.encodeRedirectURL('http://dev.sheridan.edu/uportal/errors/') );
     public static void generateErrorPage(HttpServletResponse resp, Exception e) {
          resp.setContentType("text/html");
          try {
               PrintWriter out = resp.getWriter();
               out.println("<h1>Cannot start uPortal</h1>");
               out.println("<p>Sorry, but a problem is preventing the Portal from starting. "+
                    "The error must be corrected by system administrators. Try again later.</p>");
               //out.println("<p><a href='http://www.yale.edu/portal'>Click here to display the static Yaleinfo page.</a></p>");     
               out.println("<!--");
               ErrorID eid = Errors.bug;
               String parm = "";
               if (e instanceof PortalException) {
                    PortalException pe = (PortalException)e;
                    if (pe.errorID!=null)
                         eid=pe.errorID;
                    if (pe.parameter!=null)
                         parm=pe.parameter;     
               out.println(errorInfo(eid,parm,e));
               out.println("-->");     
               out.flush();
          } catch (Exception ex) {
Thanks for your help.
John

HI,
IE is not available on the Note 4, and this option is only available on the desktop version of Firefox.
I also could not find an addon that gives a warning of a refresh in the Android version of Firefox.
However there is one in Accessibility setting of Desktop under Options.

Similar Messages

  • I have an ipod touch 4th gen and would like to install pages on it but i need ios 7 for that. how do i install an older version?

    i have an ipod touch 4th gen and would like to install pages on it but i need ios 7 for that. how do i install an older version?

    Did you follow the instrctions in this link?
    App Store: Downloading Older Versions of Apps on iOS - Apple Club

  • I would like to update Pages from 4.1 to 4.2. I did not purchase it from the App Store but installed it with iWorks. How do I complete the upgrade?

    I would like to update Pages from 4.1 to 4.2. I did not purchase it from the App Store but installed it with iWorks. How do I complete the upgrade?

    The iWork 9.2 updater is for those using Mountain Lion. Why do you want to update to Pages 4.2 if you're still running Lion? There is no benefit & many users have had problems.
    That being said, you must make sure the applications are where the installer initially put them. The updaters are very picky. If the location is not where the updater is programmed to look or if the folder doesn't have the name the updater looks for, it will not work. The applications cannot be renamed or moved. All three applications must be in the iWork '09 folder in Applications. That iWork folder must be named iWork '09. If it doesn't have the '09 Software Update won't find them & the updaters won't work.
    Now, choose Software Update from the Apple menu, from System Preferences or launch the Mac App Store & click Updates. You should get a window similar to this screenshot. Now click the Update button next to iWork 9.2.
    Alternatively, you can download the standalone update here.

  • I would like to create pages for our yearbook what is the best software

    I would like to create pages for our yearbook what is the best software - pages does seem limited.

    fruhulda wrote:
    Network 23 wrote:
    Keynote...it could make a book, but it's probably questionable whether you'd want to manage hundreds of pictures and lots of pages with it.
    Why is that questionable?
    Because Keynote does not have the industrial-strength tools to handle long form text and large numbers of graphics. When you make a long or complex document, you sometimes have to go in and fix problems in bulk, like text formatting, or updating graphics, or finessing the layout on 200 pages, things like that. A program like InDesign can deal with it through things like paragraph styles, character styles, table styles (not one-off styles, but the kind that let you update a style name and have all text that uses that style update across all pages), or a powerful link manager that lets you keep graphics outside the document so you can easily update them by reference, in bulk if needed. InDesign also has some great tools like the ability to import multiple photos at once and have them place on the layout as a nice yearbook-style grid, the instant they land on the page, without having to arrange them after they come in.
    Finally, an app like InDesign knows how to print to a commercial press, or how to produce a press-ready PDF. Keynote has no idea.
    A yearbook can run a couple hundred pages and involve hundreds of photos. I would not touch such a project with anything that wasn't truly up to the task. The best software would be InDesign or QuarkXPress. Word is not good enough. Pages is not good enough. You will tear your hair out as you fix problems on page after page, photo after photo. Keynote would probably be laughable for a yearbook. I use Keynote for presentations, Keynote is the best at what it does. A yearbook is nothing like a presentation.

  • Would like to redirect java error ExceptionHelper.java

    Hi All,
    I think this might be the right forum... anyway, I'd like to redirect this java exception handler to a different URL. Pretty simple.
    I've tried this line of code, but I can't compile... might just be in the wrong place, line 348 :
    response.sendRedirect(response.encodeRedirectURL('http://dev.sheridan.edu/uportal/errors/') );This is the whole exception file. Thank youf or your help.. I'm a newbie...
    * Copyright � 2001 The JA-SIG Collaborative.  All rights reserved.
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
    * are met:
    * 1. Redistributions of source code must retain the above copyright
    *    notice, this list of conditions and the following disclaimer.
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in
    *    the documentation and/or other materials provided with the
    *    distribution.
    * 3. Redistributions of any form whatsoever must retain the following
    *    acknowledgment:
    *    "This product includes software developed by the JA-SIG Collaborative
    *    (http://www.jasig.org/)."
    * THIS SOFTWARE IS PROVIDED BY THE JA-SIG COLLABORATIVE "AS IS" AND ANY
    * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE JA-SIG COLLABORATIVE OR
    * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
    * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
    * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
    * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
    * OF THE POSSIBILITY OF SUCH DAMAGE.
    package org.jasig.portal;
    import java.io.PrintWriter;
    import java.util.ArrayList;
    import java.util.Iterator;
    import java.util.List;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.commons.logging.Log;
    import org.apache.commons.logging.LogFactory;
    public class ExceptionHelper {
        private static final Log log = LogFactory.getLog(ExceptionHelper.class);
        // List of strings to match in traceback for various containers
         // This array must be expanded as additional Application Server
         // containers become better known
        public static final String boundaries[] =
                  "at javax.servlet.http.HttpServlet."
         * Generate traceback only to the Servlet-container interface.
         * @param ex any throwable exception
         * @return stack trace string without container layers
        public static String shortStackTrace(Throwable ex) {
             if (ex == null)
                  return "";
            java.io.StringWriter sw = new java.io.StringWriter();
            ex.printStackTrace(new java.io.PrintWriter(sw));
            sw.flush();
            String stktr = sw.toString();
            return trimStackTrace(stktr);
         * Trims a String representation of a Stack Trace to remove
         * the portion of the trace that is in the servlet container layer.
         * @param stackTrace - String result of printStackTrace
         * @return the stack trace with portions of the trace that dive into the container
         * layer removed.
        static String trimStackTrace(String stackTrace) {
            StringBuffer trimmedTrace = new StringBuffer();
            // a List of Strings to be trimmed and appended to the buffer
            // these represent elements in the causal chain
            List fragments = new ArrayList();
            int causeCut = (stackTrace.indexOf("Caused by"));
            if (causeCut > 0) {
                // there are one or more Caused by fragments to consider
                // we traverse stackTrace, parsing out fragments for later processing
                // and updating stackTrace to contain the remaining unparsed portion
                // as we go
                while (stackTrace.length() > 0) {
                    if (stackTrace.startsWith("Caused by")){
                        // don't count the "Caused by" leading the stackTrace
                        causeCut = stackTrace.substring(9).indexOf("Caused by");
                        if (causeCut > 0)
                            causeCut += 9;
                    } else {
                        causeCut = stackTrace.indexOf("Caused by");
                    if (causeCut > -1) {
                        // stackTrace currently includes multiple fragments
                        // parse out the first and leave the rest for next iteration
                        fragments.add(stackTrace.substring(0, causeCut));
                        stackTrace = stackTrace.substring(causeCut);
                    } else {
                        // stackTrace currently is a bare fragment
                        // grab it
                        fragments.add(stackTrace);
                        stackTrace = "";
            } else {
                // there's ony a single Throwable in the chain
                fragments.add(stackTrace);
            // now that we have fragments to consider
            for (Iterator iter = fragments.iterator(); iter.hasNext();){
                String consideredFragment = (String) iter.next();
                // flag to indicate that a trimmed form of this fragment has been appended
                // to the trimmed stack trace buffer
                boolean appended = false;
                for (int i=0; i < boundaries.length; i++) {
                    int cut = consideredFragment.indexOf(boundaries);
    if (cut > 0) {
    // stack trace includes a trace through our container
    // in which we are not interested: trim it.
    // grab the desired portion up to the boundary
    trimmedTrace.append(consideredFragment.substring(0, cut).trim());
    trimmedTrace.append("\n");
    appended = true;
    break;
    if (! appended) {
    // a trimmed version of this fragment was not appended
    // because it doesn't need to be trimmed -- append the whole thing.
    trimmedTrace.append(consideredFragment.trim());
    trimmedTrace.append("\n");
    return trimmedTrace.toString();
    * Generic Exception Handler called from catch clause
    * @param eid the ErrorID (as seen from catch)
    * @param parm
    * @param ex the Exception caught
    * @throws PortalException
    public static void genericHandler(ErrorID eid, String parm, Throwable ex)
    throws PortalException {
    // *** Handle PortalExceptions ***
         // Log it if logging was deferred in .signal() call
         // Rethrow it
    if (ex instanceof PortalException) {
         if (((PortalException)ex).isLogPending())
              traceToLog(eid,parm,ex);
                   throw (PortalException) ex;
    // *** Handle all other Exceptions ***
    // Log the message and traceback
    traceToLog(eid, parm, ex);
    // Create a derived PortalException chained to this
    PortalException nex;
    if (ex instanceof Exception) {
    nex = new PortalException(eid, (Exception) ex);
    } else {
         // Sorry, at this point PortalExceptions don't chain to
         // non-Exception subclasses of Throwable
    nex = new PortalException(eid);
    nex.setLogPending(false);
    ProblemsTable.store(nex);
    throw nex;
         public static void genericHandler(ErrorID eid, Throwable ex)
              throws PortalException {
                   genericHandler(eid,null,ex);
         * Create PortalException from ErrorID and throw it. Maybe trace it.
         * @param eid ErrorId
         * @param parm Additional error information
         * @param tracenow Trace now or defer till first catch.
         * @throws PortalException
    public static void signal(ErrorID eid, String parm, boolean tracenow)
    throws PortalException {
    PortalException nex = new PortalException(eid);
              nex.setParameter(parm);
    signal(nex,tracenow);
    * Create PortalException from Errorid, trace, and throw it.
    * @param eid ErrorID to use to generate PortalException
    * @param parm Additional error information
    * @throws PortalException
    public static void signal(ErrorID eid, String parm) throws PortalException {
         signal(eid,parm,true);
    * Throw PortalException provided by caller, maybe trace it.
    * @param nex Exception provided by caller
    * @param tracenow Trace now, or later after first catch.
    * @throws PortalException
    private static void signal(PortalException nex, boolean tracenow)
    throws PortalException {
    if (tracenow) {
         traceToLog(nex.getErrorID(), nex.getParameter(), nex);
         ProblemsTable.store(nex);
    throw nex;
    * Generate, trace, and throw Portal Exception given ErrorID.
    * @param eid ErrorID
    * @throws PortalException
    public static void signal(ErrorID eid)
         throws PortalException {
         signal(eid,null,true);
    * Common logic for generating log entry of errors
    * @param eid ErrorID with initial message
    * @param parm Parameter string to append to eid msg
    * @param ex Old exception
    private static void traceToLog(ErrorID eid, String parm, Throwable ex) {
         if (ex !=null &&
              ex instanceof PortalException) {
                   if (!((PortalException)ex).isLogPending())
                        return; // This PortalException was already logged.
                   else
                        ((PortalException)ex).setLogPending(false);
    String logmsg = errorInfo(eid, parm, ex);
    log.error( logmsg);
    * Generate error string for logging or /problems online display
    * @param eid Error ID
    * @param parm Parameter string
    * @param ex Exception
    * @return Multiline text with message and traceback
    public static String errorInfo(ErrorID eid, String parm, Throwable ex) {
              StringBuffer errorinfobuffer = new StringBuffer(1000);
              if (eid!=Errors.legacy)
         errorinfobuffer.append(eid.getMessage()); // Error ID message
    else
         errorinfobuffer.append(ex.getMessage());
              if (parm != null) { // Parameter data
                   errorinfobuffer.append("\n [specific data: ");
                   errorinfobuffer.append(parm);
                   errorinfobuffer.append("] ");
              errorinfobuffer.append("\n");
              if (ex!=null)
                   errorinfobuffer.append(shortStackTrace(ex)); // Stack trace
              return errorinfobuffer.toString();
    * Generic Top-Level Exception Handler caled from catch clause
    * (doesn't rethrow exception)
    * @param eid Error ID
    * @param parm Parameter string
    * @param ex Exception caught
    public static void genericTopHandler(ErrorID eid, String parm, Throwable ex) {
    // If this is an already logged Portal Exception, we are done
    if (ex instanceof PortalException &&
         !((PortalException)ex).isLogPending()) {
         return;
    traceToLog(eid, parm, ex);
    if (ex instanceof PortalException) // already in the table
         return;
              // Create a derived PortalException (just for Problems Table)
              PortalException nex=null;
              if (ex instanceof Exception)
                   nex = new PortalException(eid, (Exception) ex);
              else
                   nex = new PortalException(eid);
              ProblemsTable.store(nex);
         public static void genericTopHandler(ErrorID eid, Throwable ex) {
              genericTopHandler(eid, null, ex);
    * Generate HTML page to send to end user after fatal error
    * @param resp Servlet response object
    * @param e PortalException received at Servlet code.
         public static void generateErrorPage(HttpServletResponse resp, Exception e) {
              resp.setContentType("text/html");
              try {
                   response.sendRedirect(response.encodeRedirectURL('http://dev.sheridan.edu/uportal/errors/') );
                   PrintWriter out = resp.getWriter();
                   out.println("<h1>Cannot start uPortal</h1>");
                   out.println("<p>Sorry, but a problem is preventing the Portal from starting. "+
                        "The error must be corrected by system administrators. Try again later.</p>");
                   //out.println("<p><a href='http://www.yale.edu/portal'>Click here to display the static Yaleinfo page.</a></p>");     
                   out.println("<!--");
                   ErrorID eid = Errors.bug;
                   String parm = "";
                   if (e instanceof PortalException) {
                        PortalException pe = (PortalException)e;
                        if (pe.errorID!=null)
                             eid=pe.errorID;
                        if (pe.parameter!=null)
                             parm=pe.parameter;     
                   out.println(errorInfo(eid,parm,e));
                   out.println("-->");     
                   out.flush();
              } catch (Exception ex) {

    I've tried this line of code, but I can't compile...
    might just be in the wrong place, line 348 :
    response.sendRedirect(response.encodeRedirectURL ('http://dev.sheridan.edu/uportal/errors/') );
    Use double quotes instead of single quotes!
    Single quotes are for char literals, not string literals.
    And next time please copy and paste the complete error message, instead of just saying "it doesn't compile".

  • Would like to disable pages so that.....

    I am able to leave a public page available for link embedding on a forum. Can I disable my pages on my site WITHOUT deleting them (so that they are not available to the forum members)? I would like to post them on a second site at a later time.
    I understand that password security is only available for the entire site, not individual pages, therefore if I can remove pages from my site, and I could leave just the material posted I want viewed....I'd be a happy camper.
    Thanks

    You can hide the links at the top of the page in the inspector. So vistors of the forumpage cannot see links to the family pages.
    But if the familypage is the default page then anybody can enter that page.
    You can only password protect a site, not a page in that site.
    Perhaps you can create a family site.
    Password protect it.
    The other site will be the default site with links to the forum pages and a link to the family site. When smart forum members delete the URL to get to the default page, they won't be able to see the family webpages.
    Of course your family need to know the password.

  • Would like to change page size

    Hi,
    I'm trying to convert a Word Document with a page size of 7.5 by 10.5. When I input these settings into Word, the actual picture of the page shrinks.
    I have the virtual Adobe printer and have it set up for that page size because originally my text from Microsoft Word wasn't always on the same pages when converted into PDF. So that problem is fixed.
    However, the converted file that I get back doesn't look the same. All of the text is on the same pages but it is stretched so big.
    When I look under the PDF file under properties, it has the page setup as being correct. But the actual picture of the page is not the same and the font is stretched out huge.
    I hope this makes sense.
    Thanks

    Any solution?
    Good Luck.
    My
    Si
    tes

  • I want to change the new tab page - it currently is a list of recent site - i share the computer and find this annoying. would like all tab pages to be same as start page

    i want my new tab pages to look the same as my starter page.

    Firefox by default uses a blank page for a new tab. Something you installed has changed that action to what you are complaining about. You need to figure out which add-on made that change and disable that add-on or change the preference in that add-on.
    http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes

  • I chose a theme and would like my home page to be a blank tab, but show the theme with icons on it instead of a white page. What is the use of having a cool theme if you never see it. Is this a posibility?

    I chose the theme purple moon. I was hoping that the home page could be set up customized with icons of my most used websites and tool icons where you can see the theme, but the only think I can set it to is a blank white page.

    I have now recently downloaded 10.0.2 which is confusing in itself, as, as far as I can ascertain that is actually version 11, but I'm not even sure about that.
    Version 10.0.2 is the newest version and the successor to GarageBand '11 (version 6.0.5).
    The '11 is referring to the iLife '11 suit of multimedia application - the older GarageBand was a part of this bundle.
    Have a look at Edgar's graphical enhanced manuals, the explain very detailed how things work and why. You can buy them as iBooks from the iBook store or directly from the page:
    http://DingDingMusic.com/Manuals/

  • I would like the web pages to always be in a larger font to accommodate my visual disability-- Explorer does this, but Firefox requires that I Cnt-+ EVERY PAGE. Solutions?

    I cannot find an add-on or other feature of Firefox to enable me to enlarge the web screen a bit for ease in reading. I have already adjusted my Windows visual settings, but these do not seem to affect Firefox. IE allowed me to do so-- is there an add-on in Firefox so that I needn't hit Cntrl-+ on every web page to enlarge the font?

    The Firefox Page Zoom feature does a domain by domain level of saving the users preferred zoom level settings, there is no default Page Zoom level setting in Firefox.
    Try the Default FullZoom Level extension: <br />
    https://addons.mozilla.org/en-US/firefox/addon/6965
    Or the NoSquint extension: <br />
    https://addons.mozilla.org/en-US/firefox/addon/2592/

  • I would like to create sub-pages

    I would like to create pages that are sub-pages of other pages

    It will cost you a lot of time as family trees have lots of links.
    I use ohmigene : http://ohmi.celeonet.fr/ohmiGene/indexEN.html to generate html pages.
    It has a very clumsy interface and there are errors in the html pages, so you'll have to correct them.
    In iWeb you can use an iFrame (insert html snippet) to show the index page of your family tree.
    But, you better ask someone experienced with html family trees.

  • When I open Safari I would like to show the google page. How?

    When I open Safari, I would like the Google page showing. How do I do that?

    Create a shortcut on the home screen.
    Navigate to the Google site in Safari. Tap the Arrow icon next to the url field at the top and select - Add to Home Screen. That will put a shortcut on your home screen that you can tap on and it will open to that Google site.

  • Redirect page if authentication fails

    Hi, it seems there should be an easy answer to this although whatever we try it doesn't seem to work.
    Basically, we would like to redirect the user to a given page if the authentication to the SharePoint site fails (i.e. the standard windows login prompt pops up three times - we are using windows authentication). No matter what option we try it always
    ends up bringing the user back to a blank page.
    We have tried writing a HttpModule (and catch the if Response.StatusCode = 401), which doesn't seem to fire any events if the user is not authenticated. We have tried writing a HttpHandler, but of course we can redirect the user if there is an error code
    but can't continue onto the desired site if not. We have tried doing the following in the web.config:
    <customErrors mode="Off">
          <error statusCode="401" redirect="http://social.msdn.microsoft.com"/>
    </customErrors>
    Which doesn't work, again taking us to a blank page. Has anyone any ideas what we are doing wrong?!

    Wow, blast from the past. I'm afraid we didn't, it was incredibly frustrating as we had this working on older versions of Sharepoint. Maybe you'd have better luck posting on an ASP.NET forum. We are looking at doing the same thing in SharePoint 2010 very
    soon so if I find a solution I will post a link on this forum. Sorry about that!

  • Application redirect page to maintenance ...

    Hello,
    I would like to redirect my application url to a maintenance page when application taken down for maintenance.
    I'm using WL 10.3.2 and OHS.  I've configures mod_wl_ohs to redirect the url.
    Any pointers/help would be appreciated?
    Kind regards,
    Kam

    Hi
    First Create a maintenance page e.g. maintenance.htm and placed this under Doccument Root(E:\Oracle\Middleware\Oracle_WT1\instances\instance1\config\OHS\ohs1\error).
    Modify httpd.conf file for pirticular OHS like ohs1 under config folder(E:\Oracle\Middleware\Oracle_WT1\instances\instance1\config\OHS\ohs1)  and below line :
    ErrorDocument 403 /error/maintenance.htm
    and save it. Restart the ohs1 and test.

  • Scanning files and would like to Import one file into another.

    I am scanning pages of a book and saving them individually onto a USB Flash Drive.  I would like to put page two into the same file as page one.  How di I accomplish this task?

    Or by using the CreatePDF service.

Maybe you are looking for