Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6130151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:49:29+00:00 2026-05-23T16:49:29+00:00

Possible Duplicate: howto increase lines of java stack trace dump? I’m writing a Java

  • 0

Possible Duplicate:
howto increase lines of java stack trace dump?

I’m writing a Java Application for tomcat. whenever an Exception is being thrown I get the name of the Exception and the stack trace and in the end if it’s a long trace I get
... X more.

how can I configure tomcat to show a full stack trace ?

thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T16:49:29+00:00Added an answer on May 23, 2026 at 4:49 pm

    That’s not Tomcat’s fault, it’s the way the Throwable.printStackTraceAsCause(PrintStream s, StackTraceElement[] causedTrace) method implements the printing of stacktraces.

     /**
         * Print our stack trace as a cause for the specified stack trace.
         */
        private void printStackTraceAsCause(PrintStream s,
                                            StackTraceElement[] causedTrace)
        {
            // assert Thread.holdsLock(s);
    
            // Compute number of frames in common between this and caused
            StackTraceElement[] trace = getOurStackTrace();
            int m = trace.length-1, n = causedTrace.length-1;
            while (m >= 0 && n >=0 && trace[m].equals(causedTrace[n])) {
                m--; n--;
            }
            int framesInCommon = trace.length - 1 - m;
    
            s.println("Caused by: " + this);
            for (int i=0; i <= m; i++)
                s.println("\tat " + trace[i]);
            if (framesInCommon != 0)
                s.println("\t... " + framesInCommon + " more");
    
            // Recurse if we have a cause
            Throwable ourCause = getCause();
            if (ourCause != null)
                ourCause.printStackTraceAsCause(s, trace);
        }
    

    If you want, you can print your stacktraces yourself in a log file (or response.getOutputStream()) by getting first displaying the message of the caught element and then displaying the array element of StackTraceElement (which can be found by calling Throwable.getStackTrace() method).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: How to embed a web browser control in a cross-platform application? I'd
Possible Duplicate: How to write a basic swap function in Java Hi. I don't
Possible Duplicate: How to list available video modes using C#? My application needs a
Possible Duplicate: How to increase the size of the title bar in an Android
Possible Duplicate: Howto build a SQL statement with using IDs that might not be
Possible Duplicate: How to tell if a .NET application was compiled in DEBUG or
Possible Duplicate: howto return a array in a c++ method? How can an array
Possible Duplicate: howto return a array in a c++ method? How an array can
Possible Duplicate: How to rename java.exe/javaw.exe process? Hi, I am working on java desktop
Possible Duplicate: How to draw a rectangle on a java applet using mouse drag

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.