KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > springframework > web > context > request > ServletWebRequest


1 /*
2  * Copyright 2002-2006 the original author or authors.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.springframework.web.context.request;
18
19 import java.util.Locale JavaDoc;
20 import java.util.Map JavaDoc;
21
22 import javax.servlet.http.HttpServletRequest JavaDoc;
23
24 /**
25  * WebRequest adapter for an HttpServletRequest.
26  *
27  * @author Juergen Hoeller
28  * @since 2.0
29  */

30 public class ServletWebRequest extends ServletRequestAttributes implements WebRequest {
31
32     /**
33      * Create a new ServletWebRequest instance for the given request.
34      * @param request current HTTP request
35      */

36     public ServletWebRequest(HttpServletRequest JavaDoc request) {
37         super(request);
38     }
39
40     public String JavaDoc getParameter(String JavaDoc paramName) {
41         return getRequest().getParameter(paramName);
42     }
43
44     public String JavaDoc[] getParameterValues(String JavaDoc paramName) {
45         return getRequest().getParameterValues(paramName);
46     }
47
48     public Map JavaDoc getParameterMap() {
49         return getRequest().getParameterMap();
50     }
51
52     public Locale JavaDoc getLocale() {
53         return getRequest().getLocale();
54     }
55
56 }
57
Popular Tags