Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] jetty log question

Not sure I follow your configuration.

> I found if log4j or slf4j  exists

Does this mean you are, or are not, using slf4j + log4j?

> the Exception will turn to  WARN  o.e.jetty.servlet.ServletHandler ,
> not Exception?
> can somebody explain the behaviour?

So the Exception is logged at WARN level, but it's no longer an Exception?
I don't understand what you are saying or asking.

Joakim Erdfelt <joakim@xxxxxxxxxxx>
Expert advice, services and support from from the Jetty & CometD experts

On Wed, Nov 20, 2013 at 1:00 AM, admin dd <admin@xxxxxxxxxx> wrote:
maven webapp project


spring webmvc code like

public String login() {
        throw new Exception("test exception");
     return "/login";

when I use mvn package, put war to tomcat

access the login url

the Exception  display in the console


import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.webapp.WebAppContext;

public class QuickStartServer {
    public static final int PORT = 8080;
    public static final String CONTEXT = "/xx";

    public static void main(String[] args) throws Exception {
        Server server = new Server(PORT);
        WebAppContext context = new WebAppContext();
        System.out.println("server started");

I found if log4j or slf4j  exists
the Exception will turn to  WARN  o.e.jetty.servlet.ServletHandler ,
not Exception?
can somebody explain the behaviour?

org.springframework.web.util.NestedServletException: Request
processing failed; nested exception is java.lang.Exception: test
    at org.springframework.web.servlet.FrameworkServlet.processRequest(
    at org.springframework.web.servlet.FrameworkServlet.doGet(
Caused by: java.lang.Exception: xxxx
    at ~[classes/:na]
jetty-users mailing list

Back to the top