RE: NamedDispatcher
| Newsgroups | gmane.comp.web.httpunit.devel |
|---|---|
| Message-ID | <ABF4E02DA33A6F4BAC41122C7086C8990C2D14@bromail01.internal.gxs.com> |
What do Rummy and Condi have to say about this? Also, make sure Cheney is on board so no one gets shot in the face. he he he. Rob W. ________________________________ From: [email protected] [mailto:[email protected]] On Behalf Of Karl Rove Sent: Tuesday, May 23, 2006 5:54 PM To: [email protected] Subject: [Httpunit-develop] NamedDispatcher Hello, I noticed that servletContext.getNamedDispatcher() isn't implemented in com/meterware/servletunit/ServletUnitServletContext.java. As President Bush's Deputy Chief of Staff, I need this for my servlets. I've attached a diff of the change I made to get it to work for me. Any objections to including this? diff --recursive original-src/com/meterware/servletunit/ServletUnitServletContext.java src/com/meterware/servletunit/ServletUnitServletContext.java 22a23,24 > import javax.servlet.ServletContext; > import javax.servlet.ServletException; 26d27 < 30d30 < 33d32 < import java.util.Vector; 35,36c34 < < import javax.servlet.*; --- > import java.util.Vector; 173,175c171,188 < public javax.servlet.RequestDispatcher getNamedDispatcher(java.lang.String A) { < return null; // XXX not implemented < } --- > public javax.servlet.RequestDispatcher getNamedDispatcher( java.lang.String servletName) { > URL url; > try { > if ( ! servletName.startsWith("/")) { > servletName = "/" + servletName; > } > url = new URL( "http", "localhost", _application.getContextPath() + servletName ); > } catch (MalformedURLException e) { > e.printStackTrace(); > return null; > } > try { > return new RequestDispatcherImpl(this._application, url); > } catch (ServletException e) { > e.printStackTrace(); > return null; > } > } Yours in Oil, Karl Rove _______________________________________________________________ Enron - Boeing - General Electric - Pfizer - White House