コード例 #1
0
 // Added in Servlet 2.5
 public String getContextPath() {
   try {
     Method getContextPathMethod =
         servletContext.getClass().getMethod("getContextPath", (Class<?>[]) null); // $NON-NLS-1$
     return (String) getContextPathMethod.invoke(servletContext, (Object[]) null)
         + proxyContext.getServletPath();
   } catch (Exception e) {
     // ignore
   }
   return null;
 }
コード例 #2
0
 public void removeAttribute(String attributeName) {
   Dictionary<String, Object> attributes = proxyContext.getContextAttributes(httpContext);
   attributes.remove(attributeName);
 }
コード例 #3
0
 public void setAttribute(String attributeName, Object attributeValue) {
   Dictionary<String, Object> attributes = proxyContext.getContextAttributes(httpContext);
   attributes.put(attributeName, attributeValue);
 }
コード例 #4
0
 public Enumeration<String> getAttributeNames() {
   Dictionary<String, Object> attributes = proxyContext.getContextAttributes(httpContext);
   return attributes.keys();
 }
コード例 #5
0
 public Object getAttribute(String attributeName) {
   Dictionary<String, Object> attributes = proxyContext.getContextAttributes(httpContext);
   return attributes.get(attributeName);
 }
コード例 #6
0
 public RequestDispatcher getRequestDispatcher(String arg0) {
   return new RequestDispatcherAdaptor(
       servletContext.getRequestDispatcher(proxyContext.getServletPath() + arg0));
 }