1 16 17 package org.apache.taglibs.request; 18 19 import javax.servlet.*; 20 import javax.servlet.http.*; 21 import javax.servlet.jsp.*; 22 import javax.servlet.jsp.tagext.*; 23 24 37 38 public class RequestData 39 { 40 private HttpServletRequest req; 41 42 RequestData(HttpServletRequest request) 43 { 44 this.req = request; 45 } 46 47 55 public final String getAuthType() 56 { 57 return req.getAuthType(); 58 } 59 60 68 public final String getContextPath() 69 { 70 return req.getContextPath(); 71 } 72 73 80 public final String getMethod() 81 { 82 return req.getMethod(); 83 } 84 85 93 public final String getPathInfo() 94 { 95 return req.getPathInfo(); 96 } 97 98 106 public final String getPathTranslated() 107 { 108 return req.getPathTranslated(); 109 } 110 111 119 public final String getQueryString() 120 { 121 return req.getQueryString(); 122 } 123 124 132 public final String getRemoteUser() 133 { 134 return req.getRemoteUser(); 135 } 136 137 144 public final String getRequestedSessionId() 145 { 146 return req.getRequestedSessionId(); 147 } 148 149 157 public final String getRequestURI() 158 { 159 return req.getRequestURI(); 160 } 161 162 170 public final String getRequestURL() 171 { 172 return "" + HttpUtils.getRequestURL(req); 173 } 174 175 182 public final String getServletPath() 183 { 184 return req.getServletPath(); 185 } 186 187 195 public final String getCharacterEncoding() 196 { 197 return req.getCharacterEncoding(); 198 } 199 200 208 public final String getContentLength() 209 { 210 return "" + req.getContentLength(); 211 } 212 213 221 public final String getContentType() 222 { 223 return req.getContentType(); 224 } 225 226 234 public final String getProtocol() 235 { 236 return req.getProtocol(); 237 } 238 239 247 public final String getRemoteAddr() 248 { 249 return req.getRemoteAddr(); 250 } 251 252 260 public final String getRemoteHost() 261 { 262 return req.getRemoteHost(); 263 } 264 265 273 public final String getScheme() 274 { 275 return req.getScheme(); 276 } 277 278 285 public final String getServerName() 286 { 287 return req.getServerName(); 288 } 289 290 297 public final String getServerPort() 298 { 299 return "" + req.getServerPort(); 300 } 301 302 } 303 | Popular Tags |