[Httpunit-commit] CVS: httpunit/src/com/meterware/servletunit WebApplication.java,1.12,1.13
Brought to you by:
russgold
From: Russell G. <rus...@us...> - 2002-09-05 19:29:58
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/servletunit In directory usw-pr-cvs1:/tmp/cvs-serv8075/src/com/meterware/servletunit Modified Files: WebApplication.java Log Message: Improved handling of not found exceptions Index: WebApplication.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/servletunit/WebApplication.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- WebApplication.java 24 Jul 2002 17:33:04 -0000 1.12 +++ WebApplication.java 5 Sep 2002 19:29:55 -0000 1.13 @@ -499,7 +499,7 @@ public Servlet getServlet() throws ServletException { - if (getConfiguration() == null) throw new HttpNotFoundException( _url ); + if (getConfiguration() == null) throw new HttpNotFoundException( "No servlet mapping defined", _url ); try { return getConfiguration().getServlet(); @@ -617,7 +617,7 @@ ServletRequest get( URL url ) { String file = url.getFile(); - if (!file.startsWith( _contextPath )) throw new HttpNotFoundException( url ); + if (!file.startsWith( _contextPath )) throw new HttpNotFoundException( "File path does not begin with '" + _contextPath + "'", url ); String servletName = getServletName( file.substring( _contextPath.length() ) ); |