List of usage examples for javax.servlet RequestDispatcher toString
public String toString()
From source file:com.liferay.portlet.PortletContextImpl.java
public PortletRequestDispatcher getRequestDispatcher(String path) { RequestDispatcher rd = _ctx.getRequestDispatcher(path); // Workaround for bug in Jetty that returns the default request // dispatcher instead of null for an invalid path if ((rd != null) && (rd.getClass().getName().equals("org.mortbay.jetty.servlet.Dispatcher"))) { // Dispatcher[/,default[org.mortbay.jetty.servlet.Default]] String rdToString = rd.toString(); String rdPath = rdToString.substring(11, rdToString.indexOf(",")); if (rdPath.equals(StringPool.SLASH) && !path.equals(StringPool.SLASH)) { rd = null;/*from w ww .java 2 s .c o m*/ } } if (rd != null) { return new PortletRequestDispatcherImpl(rd, this, path); } else { return null; } }