• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 252
  • Last Modified:

how to remove this package display

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) {
            super(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?
0
poweranger77
Asked:
poweranger77
1 Solution
 
avinthmCommented:
Hi ,
>      public String toString(){
>           return (super.toString());
>      }

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


cheers
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now