comparison src/org/eclipse/jetty/server/Request.java @ 822:0048a843297a

remove Dispatcher
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 14 Sep 2016 00:58:52 -0600
parents 8e9db0bbf4f9
children 86338c0029a9
comparison
equal deleted inserted replaced
821:292f2e31ab41 822:0048a843297a
959 /* 959 /*
960 * @see javax.servlet.ServletRequest#getRequestDispatcher(java.lang.String) 960 * @see javax.servlet.ServletRequest#getRequestDispatcher(java.lang.String)
961 */ 961 */
962 public RequestDispatcher getRequestDispatcher(String path) 962 public RequestDispatcher getRequestDispatcher(String path)
963 { 963 {
964 if (path == null || _context == null) 964 throw new UnsupportedOperationException();
965 return null;
966
967 // handle relative path
968 if (!path.startsWith("/"))
969 {
970 String relTo = URIUtil.addPaths(_servletPath,_pathInfo);
971 int slash = relTo.lastIndexOf("/");
972 if (slash > 1)
973 relTo = relTo.substring(0,slash + 1);
974 else
975 relTo = "/";
976 path = URIUtil.addPaths(relTo,path);
977 }
978
979 return _context.getRequestDispatcher(path);
980 } 965 }
981 966
982 /* ------------------------------------------------------------ */ 967 /* ------------------------------------------------------------ */
983 /* 968 /*
984 * @see javax.servlet.http.HttpServletRequest#getRequestedSessionId() 969 * @see javax.servlet.http.HttpServletRequest#getRequestedSessionId()