Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] problem setting custom errorHandler

or is there a way to rewrite request to index.html if they don't match another servlet path or a static file?

On Sun, Apr 24, 2016 at 12:30 PM, Rj Ewing <ewing.rj@xxxxxxxxx> wrote:
sorry, thinking again, having the error handler would be nice in order to remove false 404's with angular app and page reloads.

do you know what the classcastexception might be about?

On Sun, Apr 24, 2016 at 12:14 PM, Jesse McConnell <jesse.mcconnell@xxxxxxxxx> wrote:

--
jesse mcconnell
jesse.mcconnell@xxxxxxxxx

On Sun, Apr 24, 2016 at 2:11 PM, Rj Ewing <ewing.rj@xxxxxxxxx> wrote:
I'm mainly want to use an ErrorHandler for my angular app can deal with the 404's. Is there a way to specify different error-page in web.xml for different servlets?

On Sun, Apr 24, 2016 at 12:09 PM, Rj Ewing <ewing.rj@xxxxxxxxx> wrote:
hm, when I do that, I get a ClassCastException:

java.lang.ClassCastException: biocode.fims.rest.FimsErrorHandler cannot be cast to org.eclipse.jetty.servlet.ErrorPageErrorHandler

On Sun, Apr 24, 2016 at 12:03 PM, Jesse McConnell <jesse.mcconnell@xxxxxxxxx> wrote:
no, right the first time, you need to be able to see the ContextHandler that and is hidden by default from the classloader

anyway, give that a whirl, I didn't try it but at first blush should be fine

--
jesse mcconnell
jesse.mcconnell@xxxxxxxxx

On Sun, Apr 24, 2016 at 1:59 PM, Jesse McConnell <jesse.mcconnell@xxxxxxxxx> wrote:
oh wait, not right, that is a handler...hm.

--
jesse mcconnell
jesse.mcconnell@xxxxxxxxx

On Sun, Apr 24, 2016 at 1:56 PM, Jesse McConnell <jesse.mcconnell@xxxxxxxxx> wrote:

--
jesse mcconnell
jesse.mcconnell@xxxxxxxxx

On Sun, Apr 24, 2016 at 1:52 PM, Rj Ewing <ewing.rj@xxxxxxxxx> wrote:
is there anyway to include it in the webapp? I'd rather not have to add it to each jetty instance if possible

On Sun, Apr 24, 2016 at 11:38 AM, Jesse McConnell <jesse.mcconnell@xxxxxxxxx> wrote:
probably a classloader issue, if you have that class in the webapp you won't be able to see it from the webappclassloader itself

typically those go in the server classes a la a module

--
jesse mcconnell
jesse.mcconnell@xxxxxxxxx

On Sun, Apr 24, 2016 at 1:01 PM, Rj Ewing <ewing.rj@xxxxxxxxx> wrote:
I am trying to set a custom errorHandler for my web app, but am getting a noSuchMethod Exception on WebAppContext:

java.lang.NoSuchMethodException: class org.eclipse.jetty.webapp.WebAppContext.setErrorHandler(class biocode.fims.rest.FimsErrorHandler)

I'm using jetty 9. My jetty-env.xml looks like:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
 
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
    <Set name="errorHandler">
        <New class="biocode.fims.rest.FimsErrorHandler"/>
    </Set>
</Configure>

When I look at http://download.eclipse.org/jetty/9.3.8.v20160314/apidocs/org/eclipse/jetty/webapp/WebAppContext.html, it seems that the WebAppContext should have a setErrorHandler method

_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users




_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users



_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users



Back to the top