Results 1 to 6 of 6

Thread: HttpServletBean init() question

  1. #1
    Join Date
    Oct 2004
    Location
    New York, NY
    Posts
    8

    Default HttpServletBean init() question

    In HttpServletBean class line 84 init() method:
    Code:
    catch (BeansException ex) {
        logger.error("Failed to set bean properties on servlet '" + getServletName() + "'", ex);
        throw ex;
    }
    The BeansException ex is thrown again. If I misconfig a jar file, this will bomb out without sending any message to the screen(a blank screen), I am wondering whether this ex should be converted to something that servlet containers would know and thus send a proper message to the screen, rather than a blank screen.

    My case was that I was trying to remove some unnecessary jar files.

    Thanks,
    Rick

  2. #2
    Join Date
    Aug 2004
    Location
    Amsterdam, Netherlands
    Posts
    450

    Default

    The BeansException is thrown at servlet-startup time, so you should see it in your console or error log. Do you mean that any request to the servlet that failed starting up will generate a blank screen now, not showing any exception?

  3. #3
    Join Date
    Oct 2004
    Location
    New York, NY
    Posts
    8

    Default I didn't load spring servlet during startup...

    I didn't load the servlet during startup, only load it when a req comes in, that's when a blank page is shown.

  4. #4
    Join Date
    Aug 2004
    Location
    Amsterdam, Netherlands
    Posts
    450

    Default

    Does that mean you're happy with preloading the servlet? I usually like to initialize as much as possible when starting the server to know upfront when thing fail.

    Alef

  5. #5
    Join Date
    Oct 2004
    Location
    New York, NY
    Posts
    8

    Default

    I have no problem to make the servlet loaded during startup. Just report this scenario. A servlet error should be informed to the servlet container, so a 500 error could be generated to the client, rather than a blank page instead. But it's just my view, I am not picking on something, just try to make it better.

  6. #6

    Default

    How did you configure the HttpServletBean?
    I can't get the init method to be called and am unable to find any documentation about how to configure this class.
    thx

Similar Threads

  1. Forgot password (e.g. secret question) using Acegi
    By lowerymb77 in forum Security
    Replies: 1
    Last Post: Oct 16th, 2005, 10:46 PM
  2. simple question
    By yukster in forum Security
    Replies: 6
    Last Post: Sep 19th, 2005, 07:58 AM
  3. init method in HttpServletBean set as final
    By james_a_woods in forum Web
    Replies: 2
    Last Post: Jun 13th, 2005, 07:23 PM
  4. Replies: 6
    Last Post: Oct 8th, 2004, 02:21 PM
  5. customized init method
    By novotny in forum Container
    Replies: 1
    Last Post: Aug 30th, 2004, 04:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •