• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 236
  • 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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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