{"id":326902,"date":"2023-09-05T02:44:36","date_gmt":"2023-09-05T02:44:36","guid":{"rendered":"https:\/\/www.baeldung.com\/java-servlet-request-set-parameter"},"modified":"2023-09-05T02:44:36","modified_gmt":"2023-09-05T02:44:36","slug":"set-a-parameter-in-an-httpservletrequest-in-java","status":"publish","type":"post","link":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/2023\/09\/05\/set-a-parameter-in-an-httpservletrequest-in-java\/","title":{"rendered":"Set a Parameter in an HttpServletRequest in Java"},"content":{"rendered":"<p class=\"syndicated-attribution\"><meta name= \\\"keywords \\\" content= \\\"\u96fb\u5b50\u8a08\u7b97\u6a5f, \u6559\u80b2, IT \u96fb\u8166\u73ed,\u96fb\u8166\u88dc\u7fd2\uff0c \u96fb\u8166\u73ed\uff0c \u5bb6\u6559\uff0c \u79c1\u4eba\u8001\u5e2b\uff0c \u8cc7\u8a0a\u6280\u8853\uff0c \u7a0b\u5e8f\u8a2d\u8a08\uff0c \u96fb\u5b50\u8a08\u7b97\u6a5f\uff0c \u904a\u6232\uff0c \u860b\u679c\uff0c \u96fb\u5f71\uff0c \u8a08\u7b97\u6a5f\uff0c\u7de8\u78bc\uff0c Java\uff0c C\/C++\uff0c JavaScript\uff0c PHP\uff0c HTML\uff0c CSS\uff0c MySQL\uff0c mobile\uff0c Android\uff0c \u52d5\u6f2b\uff0c Python\uff0c teacher\uff0c \u88dc\u7fd2\uff0c \u96fb\u8166\u88dc\u7fd2 \u8cc7\u8a0a, \u7535\u5b50\u8ba1\u7b97\u673a, IT ,Game, apple, movie, Computer,student,Java,\u6559\u80b2, ,\u5b66\u751f, \u5b66\u4e60, learn, \u6559\u5b66,  Android, apple,anime, animation, \u4fe1\u606f\u6280\u672f, \u7a0b\u5e8f\u8bbe\u8ba1, \u79fb\u52a8\u7535\u8bdd, \u8cc7\u8a0a\u79d1\u6280,Game, Jeu, Juego,Call Of Duty ,\u4f7f\u547d\u53ec\u559a , \u6e38\u620f, \u7535\u5b50\u6e38\u620f,, \u591a\u4eba\u7535\u5b50\u6e38\u620f, \u7f51\u7edc\u6e38\u620f\uff0conline\uff0conline game, \u624b\u673a\u6e38\u620f, mobile \\\"><\/p>\n<p><img src=\"https:\/\/www.baeldung.com\/wp-content\/uploads\/2018\/10\/Social-Javaee-4-k-featured-1024x536.jpg\" class=\"webfeedsFeaturedVisual wp-post-image\" alt=\"\" decoding=\"async\" loading=\"lazy\" style=\"float: left; margin-right: 5px;\" srcset=\"https:\/\/www.baeldung.com\/wp-content\/uploads\/2018\/10\/Social-Javaee-4-k-featured-1024x536.jpg 1024w, https:\/\/www.baeldung.com\/wp-content\/uploads\/2018\/10\/Social-Javaee-4-k-featured-300x157.jpg 300w, https:\/\/www.baeldung.com\/wp-content\/uploads\/2018\/10\/Social-Javaee-4-k-featured-768x402.jpg 768w, https:\/\/www.baeldung.com\/wp-content\/uploads\/2018\/10\/Social-Javaee-4-k-featured-100x52.jpg 100w, https:\/\/www.baeldung.com\/wp-content\/uploads\/2018\/10\/Social-Javaee-4-k-featured.jpg 1200w\" sizes=\"(max-width: 580px) 100vw, 580px\" \/><\/p>\n<h2 id=\"bd-overview\" data-id=\"overview\">1. Overview<\/h2>\n<div class=\"bd-anchor\" id=\"overview\"><\/div>\n<p>When developing web applications in Java using the <a href=\"https:\/\/feeds.feedblitz.com\/~\/t\/0\/0\/baeldung\/~https:\/\/www.baeldung.com\/intro-to-servlets\">Servlet API<\/a>, the <em>HttpServletRequest<\/em> object plays a key role in processing incoming HTTP requests. It provides access to various aspects of the request such as parameters, headers, and attributes.<\/p>\n<p>Request parameters are always supplied by the HTTP client. However, there are scenarios where we might need to set parameters programmatically within the <em>HttpServletRequest<\/em> object before it&#8217;s processed by our application.<\/p>\n<p>It&#8217;s important to note that <strong><em>HttpServletRequest<\/em> lacks setter methods for adding new parameters or altering parameter values. <\/strong>In this article, we&#8217;ll explore how to achieve this by extending the functionalities of the original <em>HttpServletRequest<\/em>.<\/p>\n<h2 id=\"bd-maven-dependencies\" data-id=\"maven-dependencies\">2. Maven Dependencies<\/h2>\n<div class=\"bd-anchor\" id=\"maven-dependencies\"><\/div>\n<p>In addition to the standard <a href=\"https:\/\/feeds.feedblitz.com\/~\/t\/0\/0\/baeldung\/~https:\/\/mvnrepository.com\/artifact\/javax.servlet\/javax.servlet-api\">Java Servlet<\/a> API:<\/p>\n<pre><code class=\"language-xml\">&lt;dependency&gt;\r\n    &lt;groupId&gt;javax.servlet&lt;\/groupId&gt;\r\n    &lt;artifactId&gt;javax.servlet-api&lt;\/artifactId&gt;\r\n    &lt;version&gt;4.0.1&lt;\/version&gt;\r\n    &lt;scope&gt;provided&lt;\/scope&gt;\r\n&lt;\/dependency&gt;<\/code><\/pre>\n<p>We&#8217;ll also use the <a href=\"https:\/\/feeds.feedblitz.com\/~\/t\/0\/0\/baeldung\/~https:\/\/mvnrepository.com\/artifact\/org.apache.commons\/commons-text\">commons-text<\/a> library in one of our use cases to sanitize request parameters by escaping HTML entities:<\/p>\n<pre><code class=\"language-xml\">&lt;dependency&gt;\r\n    &lt;groupId&gt;org.apache.commons&lt;\/groupId&gt;\r\n    &lt;artifactId&gt;commons-text&lt;\/artifactId&gt;\r\n    &lt;version&gt;1.10.0&lt;\/version&gt;\r\n&lt;\/dependency&gt;<\/code><\/pre>\n<h2 id=\"bd-essential-servlet-components\" data-id=\"essential-servlet-components\">3. Essential Servlet Components<\/h2>\n<div class=\"bd-anchor\" id=\"essential-servlet-components\"><\/div>\n<p>Before we dive into the real-world usage examples, let&#8217;s take a quick look at some foundational Servlet components that we&#8217;ll make use of.<\/p>\n<h3 id=\"bd-1-httpservletrequest\" data-id=\"1-httpservletrequest\">3.1. <em>HttpServletRequest<\/em><\/h3>\n<div class=\"bd-anchor\" id=\"1-httpservletrequest\"><\/div>\n<p>The <em>HttpServletRequest<\/em> class is the primary means of communication between clients and Servlets. It <strong>encapsulates incoming HTTP requests<\/strong>, providing access to parameters, headers, and other request-related information.<\/p>\n<h3 id=\"bd-2-httpservletrequestwrapper\" data-id=\"2-httpservletrequestwrapper\">3.2. <em>HttpServletRequestWrapper<\/em><\/h3>\n<div class=\"bd-anchor\" id=\"2-httpservletrequestwrapper\"><\/div>\n<p>The <em>HttpServletRequestWrapper<\/em> extends the capabilities of <em>HttpServletRequest<\/em> by acting as a <a href=\"https:\/\/feeds.feedblitz.com\/~\/t\/0\/0\/baeldung\/~https:\/\/www.baeldung.com\/java-decorator-pattern\">decorator<\/a> of an existing <em>HttpServletRequest<\/em> object. This allows us to <strong>attach additional responsibilities<\/strong> according to our specific needs.<\/p>\n<h3 id=\"bd-3-filter\" data-id=\"3-filter\">3.3. <em>Filter<\/em><\/h3>\n<div class=\"bd-anchor\" id=\"3-filter\"><\/div>\n<p>A <a href=\"https:\/\/feeds.feedblitz.com\/~\/t\/0\/0\/baeldung\/~https:\/\/www.baeldung.com\/intercepting-filter-pattern-in-java\"><em>Filter<\/em><\/a> captures and processes requests and responses as they traverse the servlet container. These <em>Filters<\/em> are designed to invoke before Servlet execution, empowering them to <strong>alter both incoming requests and outgoing responses<\/strong>.<\/p>\n<h2 id=\"bd-parameter-sanitization\" data-id=\"parameter-sanitization\">4. Parameter Sanitization<\/h2>\n<div class=\"bd-anchor\" id=\"parameter-sanitization\"><\/div>\n<p>One of the applications of setting parameters programmatically within <em>HttpServletRequest<\/em> is to sanitize request parameters, effectively mitigating <a href=\"https:\/\/feeds.feedblitz.com\/~\/t\/0\/0\/baeldung\/~https:\/\/www.baeldung.com\/cs\/cross-site-scripting-xss-explained\">Cross-Site Scripting (XSS)<\/a> vulnerabilities. <strong>This procedure involves the elimination or encoding of potentially harmful characters from user input, thus enhancing the security of the web application.<\/strong><\/p>\n<h3 id=\"bd-1-example\" data-id=\"1-example\">4.1. Example<\/h3>\n<div class=\"bd-anchor\" id=\"1-example\"><\/div>\n<p>Now, let&#8217;s explore the process in detail. First of all, we have to set up a Servlet <em>Filter<\/em> to intercept the requests. The filter provides a way to modify the request and response before it reaches the target Servlet or JSP.<\/p>\n<p>Here&#8217;s a concrete example of a Servlet <em>Filter<\/em> that intercepts all requests to a specific URL pattern, ensuring the filter chain returns the <em>SanitizeParametersRequestWrapper<\/em> over the original <em>HttpSevletRequest<\/em> object:<\/p>\n<pre><code class=\"language-java\">@WebFilter(urlPatterns = {&quot;\/sanitize\/with-sanitize.jsp&quot;})\r\npublic class SanitizeParametersFilter implements Filter {\r\n    @Override\r\n    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)\r\n            throws IOException, ServletException {\r\n        HttpSerlvetRequest httpReq = (HttpSerlvetRequest) request;\r\n        chain.doFilter(new SanitizeParametersRequestWrapper(httpReq), response);\r\n    }\r\n}<\/code><\/pre>\n<p>The class <em>SanitizeParameterRequestWrapper<\/em> extends <em>HttpServletRequestWrapper<\/em>. This plays a crucial role in the parameter sanitization process. This class is designed to sanitize the request parameters from the original <em>HttpServletRequest<\/em> and expose only the sanitized parameters to the calling JSP:<\/p>\n<pre><code class=\"language-java\">public class SanitizeParametersRequestWrapper extends HttpServletRequestWrapper {\r\n    private final Map&lt;String, String[]&gt; sanitizedMap;\r\n    public SanitizeParametersRequestWrapper(HttpServletRequest request) {\r\n        super(request);\r\n        sanitizedMap = Collections.unmodifiableMap(\r\n            request.getParameterMap().entrySet().stream()\r\n                .collect(Collectors.toMap(\r\n                  Map.Entry::getKey,\r\n                  entry -&gt; Arrays.stream(entry.getValue())\r\n                    .map(StringEscapeUtils::escapeHtml4)\r\n                    .toArray(String[]::new)\r\n                )));\r\n    }\r\n    @Override\r\n    public Map&lt;String, String[]&gt; getParameterMap() {\r\n        return sanitizedMap;\r\n    }\r\n    @Override\r\n    public String[] getParameterValues(String name) {\r\n        return Optional.ofNullable(getParameterMap().get(name))\r\n            .map(values -&gt; Arrays.copyOf(values, values.length))\r\n            .orElse(null);\r\n    }\r\n    @Override\r\n    public String getParameter(String name) {\r\n        return Optional.ofNullable(getParameterValues(name))\r\n            .map(values -&gt; values[0])\r\n            .orElse(null);\r\n    }\r\n}<\/code><\/pre>\n<p>In the constructor, we iterate over each request parameter and use <em>StringEscapeUtils.escapeHtml4<\/em> to sanitize the value. The processed parameters are collected in a new sanitized map.<\/p>\n<p>We override the <em>getParameter<\/em> method to return the corresponding parameter from the sanitized map instead of the original request parameters. Even though the <em>getParameter<\/em> method is the primary focus of use, it&#8217;s vital to override <em>getParameterMap<\/em>\u00a0and <em>getParameterValues<\/em>,\u00a0too. <strong>We ensure consistent behavior among all parameter retrieval methods and maintain security standards throughout them.<\/strong><\/p>\n<p>As per the specification, the <em>getParameterMap<\/em>\u00a0method guarantees an unmodifiable map that prevents changing the internal values.<strong> Hence, it&#8217;s important to adhere to this contract and to ensure that the override also returns an unmodifiable map. <\/strong>Similarly, the overridden <em>getParameterValues<\/em> method returns a cloned array instead of its internal value.<\/p>\n<p>Now, let&#8217;s create a JSP to illustrate our work. It simply renders the value of the <em>input<\/em> request parameter on the screen:<\/p>\n<pre><code class=\"language-xml\">The text below comes from request parameter &quot;input&quot;:&lt;br\/&gt;\r\n&lt;%=request.getParameter(&quot;input&quot;)%&gt;<\/code><\/pre>\n<h3 id=\"bd-2-results\" data-id=\"2-results\">4.2. Results<\/h3>\n<div class=\"bd-anchor\" id=\"2-results\"><\/div>\n<p>Now, let&#8217;s run the JSP without the sanitization filter activated. We&#8217;ll inject a script tag to the request parameter as a reflected XSS:<\/p>\n<pre><code class=\"language-plaintext\">http:\/\/localhost:8080\/sanitize\/without-sanitize.jsp?input=&lt;script&gt;alert(&#039;Hello&#039;);&lt;\/script&gt;<\/code><\/pre>\n<p>We&#8217;ll see that the JavaScript embedded in the parameter is being executed by the browser:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"\" src=\"https:\/\/www.baeldung.com\/wp-content\/uploads\/2023\/09\/hello-popup.jpg\" width=\"542\" height=\"160\" \/><\/p>\n<p>Next, we&#8217;ll run the sanitized version:<\/p>\n<pre><code class=\"language-plaintext\">http:\/\/localhost:8080\/sanitize\/with-sanitize.jsp?input=&lt;script&gt;alert(&#039;Hello&#039;);&lt;\/script&gt;<\/code><\/pre>\n<p>In this case, the filter will capture the request and pass the <em>SanitizeParameterRequestWrapper<\/em> to the calling JSP. As a result, the popup will no longer appear. Instead, we&#8217;ll observe that HTML entities are escaped and visibly rendered on the screen:<\/p>\n<pre><code class=\"language-xml\">The text below comes from request parameter &quot;input&quot;:\r\n&lt;script&gt;alert(&#039;Hello&#039;);&lt;\/script&gt;<\/code><\/pre>\n<h2 id=\"bd-third-party-resource-access\" data-id=\"third-party-resource-access\">5. Third-Party Resource Access<\/h2>\n<div class=\"bd-anchor\" id=\"third-party-resource-access\"><\/div>\n<p>Let&#8217;s consider another scenario where a third-party module accepts a request parameter <em>locale<\/em> to change the language displayed by the module. Note that we are unable to modify the source code of the third-party module directly.<\/p>\n<p>In our example, we&#8217;ll set the <em>locale<\/em> parameter to the default system locale. However, it could also be taken from another source, such as the HTTP session.<\/p>\n<h3 id=\"bd-1-example-1\" data-id=\"1-example-1\">5.1. Example<\/h3>\n<div class=\"bd-anchor\" id=\"1-example-1\"><\/div>\n<p>The third-party module is a JSP page:<\/p>\n<pre><code class=\"language-xml\">&lt;%\r\n    String localeStr = request.getParameter(&quot;locale&quot;);\r\n    Locale currentLocale = (localeStr != null ? new Locale(localeStr) : null);\r\n%&gt;\r\nThe language you have selected: &lt;%=currentLocale != null ? currentLocale.getDisplayLanguage(currentLocale) : &quot; None&quot;%&gt;<\/code><\/pre>\n<p>If the <em>locale<\/em> parameter is provided, the module displays the language name.<\/p>\n<p>We&#8217;ll provide the default system language <em>Locale.getDefault().getLanguage()<\/em> to the target request parameter. To do this, let&#8217;s set the <em>locale<\/em> parameter in our <em>SetParameterRequestWrapper<\/em>, which decorates the original <em>HttpServletRequest<\/em>:<\/p>\n<pre><code class=\"language-java\">@WebServlet(name = &quot;LanguageServlet&quot;, urlPatterns = &quot;\/setparam\/lang&quot;)\r\npublic class LanguageServlet extends HttpServlet {\r\n    @Override\r\n    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {\r\n        SetParameterRequestWrapper requestWrapper = new SetParameterRequestWrapper(request);\r\n        requestWrapper.setParameter(&quot;locale&quot;, Locale.getDefault().getLanguage());\r\n        request.getRequestDispatcher(&quot;\/setparam\/3rd_party_module.jsp&quot;).forward(requestWrapper, response);\r\n    }\r\n}<\/code><\/pre>\n<p>We&#8217;ll take a similar approach to the previous section when creating the <em>SetParameterRequestWrapper<\/em>. In addition, we&#8217;ll implement the <em>setParameter<\/em>\u00a0method to add a new parameter to the existing parameter map:<\/p>\n<pre><code class=\"language-java\">public class SetParameterRequestWrapper extends HttpServletRequestWrapper {\r\n    private final Map&lt;String, String[]&gt; paramMap;\r\n    public SetParameterRequestWrapper(HttpServletRequest request) {\r\n        super(request);\r\n        paramMap = new HashMap&lt;&gt;(request.getParameterMap());\r\n    }\r\n    @Override\r\n    public Map&lt;String, String[]&gt; getParameterMap() {\r\n        return Collections.unmodifiableMap(paramMap);\r\n    }\r\n    public void setParameter(String name, String value) {\r\n        paramMap.put(name, new String[] {value});\r\n    }\r\n    \/\/ getParameter() and getParameterValues() are the same as SanitizeParametersRequestWrapper\r\n}<\/code><code class=\"language-xml\"><\/code><\/pre>\n<p>The <em>getParameter<\/em> method retrieves parameters stored within the <em>paramMap<\/em> instead of the original request.<\/p>\n<h3 id=\"bd-2-results-1\" data-id=\"2-results-1\">5.2. Results<\/h3>\n<div class=\"bd-anchor\" id=\"2-results-1\"><\/div>\n<p><em>LangaugeServlet<\/em> passes the locale parameter to the third-party module via <em>SetParameterRequestWrapper<\/em>. We&#8217;ll see the following when we access the third-party module on an English language server:<\/p>\n<pre><code class=\"language-xml\">The language you have selected: English<\/code><\/pre>\n<h2 id=\"bd-conclusion\" data-id=\"conclusion\">6. Conclusion<\/h2>\n<div class=\"bd-anchor\" id=\"conclusion\"><\/div>\n<p>In this article, we looked at some important Servlet components that we can use in Java web application development to handle client requests. These include <em>HttpServletRequest<\/em>, <em>HttpServletRequestWrapper<\/em>, and <em>Filter<\/em>.<\/p>\n<p>Through concrete examples, <strong>we&#8217;ve demonstrated how to extend the capabilities of <em>HttpServletRequest<\/em> to programmatically set and modify request parameters.<\/strong><\/p>\n<p>Whether it&#8217;s for enhancing security by sanitizing user input or integrating with third-party resources, these techniques empower developers to cope with diverse scenarios.<\/p>\n<p>As usual, the full source code for this example is available <a href=\"https:\/\/feeds.feedblitz.com\/~\/t\/0\/0\/baeldung\/~https:\/\/github.com\/eugenp\/tutorials\/tree\/master\/web-modules\/javax-servlets-2\">over on GitHub<\/a>.<\/p>\n<p><Img align=\"left\" border=\"0\" height=\"1\" width=\"1\" alt=\"\" style=\"border:0;float:left;margin:0;padding:0;width:1px!important;height:1px!important;\" hspace=\"0\" src=\"https:\/\/feeds.feedblitz.com\/~\/i\/792249893\/0\/baeldung\"><\/p>\n<div style=\"clear:both;padding-top:0.2em;\"><a title=\"Like on Facebook\" href=\"https:\/\/feeds.feedblitz.com\/_\/28\/792249893\/baeldung\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/fblike20.png\" style=\"border:0;margin:0;padding:0;\"><\/a>&#160;<a title=\"Pin it!\" href=\"https:\/\/feeds.feedblitz.com\/_\/29\/792249893\/baeldung,https%3A%2F%2Fwww.baeldung.com%2Fwp-content%2Fuploads%2F2018%2F10%2FSocial-Javaee-4-k-featured-1024x536.jpg\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/pinterest20.png\" style=\"border:0;margin:0;padding:0;\"><\/a>&#160;<a title=\"Tweet This\" href=\"https:\/\/feeds.feedblitz.com\/_\/24\/792249893\/baeldung\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/twitter20.png\" style=\"border:0;margin:0;padding:0;\"><\/a>&#160;<a title=\"Subscribe by email\" href=\"https:\/\/feeds.feedblitz.com\/_\/19\/792249893\/baeldung\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/email20.png\" style=\"border:0;margin:0;padding:0;\"><\/a>&#160;<a title=\"Subscribe by RSS\" href=\"https:\/\/feeds.feedblitz.com\/_\/20\/792249893\/baeldung\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/rss20.png\" style=\"border:0;margin:0;padding:0;\"><\/a>&#160;<a rel=\"NOFOLLOW\" title=\"View Comments\" href=\"https:\/\/www.baeldung.com\/java-servlet-request-set-parameter#respond\"><img decoding=\"async\" height=\"20\" style=\"border:0;margin:0;padding:0;\" src=\"https:\/\/assets.feedblitz.com\/i\/comments20.png\"><\/a>&#160;<a title=\"Follow Comments via RSS\" href=\"https:\/\/www.baeldung.com\/java-servlet-request-set-parameter\/feed\"><img decoding=\"async\" height=\"20\" style=\"border:0;margin:0;padding:0;\" src=\"https:\/\/assets.feedblitz.com\/i\/commentsrss20.png\"><\/a>&#160;<\/div>\n\n<p class=\"syndicated-attribution\"><figure class= \\\"wp-block-image alignnone \\\"><img src= \\\"http:\/\/itteacheritfreelance.hk\/test\/wordpress\/wp-content\/uploads\/2016\/05\/logo2-2.png\\\" alt=\\\"IT\u96fb\u8166\u88dc\u7fd2 java\u88dc\u7fd2 \u70ba\u5927\u5bb6\u914d\u5c0d\u96fb\u8166\u88dc\u7fd2,IT freelance, \u79c1\u4eba\u8001\u5e2b, PHP\u88dc\u7fd2,CSS\u88dc\u7fd2,XML,Java\u88dc\u7fd2,MySQL\u88dc\u7fd2,graphic design\u88dc\u7fd2,\u4e2d\u5c0f\u5b78ICT\u88dc\u7fd2,\u4e00\u5c0d\u4e00\u79c1\u4eba\u88dc\u7fd2\u548cFreelance\u81ea\u7531\u5de5\u4f5c\u914d\u5c0d\u3002\\\"\/><figcaption>\u7acb\u523b\u8a3b\u518a\u53ca\u5831\u540d\u96fb\u8166\u88dc\u7fd2\u8ab2\u7a0b\u5427!<\/figcaption><\/figure>\r\n<\/br>Find A Teacher Form:\r\n<\/br>https:\/\/docs.google.com\/forms\/d\/1vREBnX5n262umf4wU5U2pyTwvk9O-JrAgblA-wH9GFQ\/viewform?edit_requested=true#responses\r\n<\/br><\/br>Email:\r\n<\/br>public1989two@gmail.com<br><br><br><br><br><br><br>\r\n<a href=www.itsec.hk style=color:#FFFFFF;>www.itsec.hk<\/a><br>\r\n<a href=\\\"www.itsec.vip\\\" style=color:#FFFFFF;>www.itsec.vip<\/a><br>\r\n<a href=\\\"www.itseceu.uk\\\" style=color:#FFFFFF;>www.itseceu.uk<\/a><br><\/p>","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p><img decoding=\"async\" src=\"https:\/\/www.baeldung.com\/wp-content\/uploads\/2018\/10\/Social-Javaee-4-k-featured-1024x536.jpg\" class=\"webfeedsFeaturedVisual wp-post-image\" alt=\"\" loading=\"lazy\"><\/p>\n<p>Learn how to modify a Servlet API request to set parameters that were not in the original HTTP request.<\/p>\n<div><a title=\"Like on Facebook\" href=\"https:\/\/feeds.feedblitz.com\/_\/28\/792249893\/baeldung\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/fblike20.png\"><\/a>\u00a0<a title=\"Pin it!\" href=\"https:\/\/feeds.feedblitz.com\/_\/29\/792249893\/baeldung,https%3A%2F%2Fwww.baeldung.com%2Fwp-content%2Fuploads%2F2018%2F10%2FSocial-Javaee-4-k-featured-1024x536.jpg\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/pinterest20.png\"><\/a>\u00a0<a title=\"Tweet This\" href=\"https:\/\/feeds.feedblitz.com\/_\/24\/792249893\/baeldung\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/twitter20.png\"><\/a>\u00a0<a title=\"Subscribe by email\" href=\"https:\/\/feeds.feedblitz.com\/_\/19\/792249893\/baeldung\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/email20.png\"><\/a>\u00a0<a title=\"Subscribe by RSS\" href=\"https:\/\/feeds.feedblitz.com\/_\/20\/792249893\/baeldung\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/rss20.png\"><\/a>\u00a0<a rel=\"NOFOLLOW\" title=\"View Comments\" href=\"https:\/\/www.baeldung.com\/java-servlet-request-set-parameter#respond\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/comments20.png\"><\/a>\u00a0<a title=\"Follow Comments via RSS\" href=\"https:\/\/www.baeldung.com\/java-servlet-request-set-parameter\/feed\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/commentsrss20.png\"><\/a>\u00a0<\/div>\n<\/div>","protected":false},"author":1978,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"Set a Parameter in an HttpServletRequest in Java - ITTeacherITFreelance.hk","description":"Learn how to modify a Servlet API request to set parameters that were not in the original HTTP request. \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0"},"footnotes":""},"categories":[6,1307],"tags":[10568,10569],"_links":{"self":[{"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/326902"}],"collection":[{"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/1978"}],"replies":[{"embeddable":true,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=326902"}],"version-history":[{"count":1,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/326902\/revisions"}],"predecessor-version":[{"id":326903,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/326902\/revisions\/326903"}],"wp:attachment":[{"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=326902"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=326902"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=326902"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}