Article:
  Two Servlet Filters Every Web Application Should Have
Subject:   Exception thrown
Date:   2003-12-03 07:48:03
From:   anonymous2
Two problems:


One - request.getQueryString() can return null;
Second - On windows, File.getAbsolutePath() returns path with backslashes (\), and the code "name.lastIndexOf" uses "/" - should be using "File.separatorChar".

Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • Exception thrown
    2003-12-03 16:52:50  jfalkner [View]

    1. It shouldn't matter. Are you having troubles when a null value is returned?

    2. The code has been udpated to use File.separatorChar, you can get a copy at http://www.jspbook.com/jspbook.jar.