how to remove this package display

Posted on 2006-04-25
Last Modified: 2010-04-01
hi, i am having this file,

package a.b.c;

public class UserException extends Exception{

      static Logger logger = Logger.getLogger(UserException.class.getName());

      public UserException(String msg) {
      public UserException() {
      public String toString(){
            return (super.toString());
So, in my application,

i initialised the application with this,

new UserException("No Result")

and i will do a printout overall, with this,

      main_message = e.toString();
      req.setAttribute("main_message", main_message);

by using the request session to pass it to my JSP page.

Thus, it'll print out : "a.b.c.UserException : No Result"

How can i only need to print out "No Result" only? Anyway to do this?
Question by:poweranger77
    1 Comment
    LVL 6

    Accepted Solution

    Hi ,
    >      public String toString(){
    >           return (super.toString());
    >      }

    change this to
            public String toString(){
                return (super.getMessage());


    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Help with LDAp login using jsp 6 101
    Fisheye tool 2 96
    TreeSet comparator example 7 86
    How to set default webapp for host 6 38
    If you're not part of the solution, you're part of the problem.   Tips on how to secure IoT devices, even the dumbest ones, so they can't be used as part of a DDoS botnet.  Use PRTG Network Monitor as one of the building blocks, to detect unusual…
    Great sound, comfort and fit, excellent build quality, versatility, compatibility. These are just some of the many reasons for choosing a headset from Sennheiser.
    This video discusses moving either the default database or any database to a new volume.
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now