title: How to set request.getParameter in jsp:setProperty
body: <p>I used beans/form processing to take input parameters on login screen and then with those parameters try and log the user into the application.</p>
  
  <p>However I am getting an error- </p>
  
  <blockquote>
    <p>org.apache.jasper.JasperException: /loginbean.jsp(6,59) Attribute value request.getParameter("userName") is quoted with " which must be escaped when used within the val</p>
  </blockquote>
  
  <p>The line of code which has this error is the second line in the block of code given below-
  (ie line of code for the property with name='userName')</p>
  
  <p><code>loginbean.jsp</code></p>
  
  <pre><code>&lt;jsp:useBean id="db" scope="request" class="logbean.LoginBean" &gt;
    &lt;jsp:setProperty name="db" property="userName" value="&lt;%=request.getParameter("userName")%&gt;"/&gt;
    &lt;jsp:setProperty name="db" property="password" value="&lt;%=request.getParameter("password")%&gt;"/&gt;
   &lt;/jsp:useBean&gt;
  </code></pre>
  
  <p><code>LoginBean.java</code></p>
  
  <pre><code>package logbean;
  public class LoginBean {
    String userName="";
    String password="";
    public String getUserName() {
    return userName;
    }
    public void setUsername(String username) {
    this.userName = userName;
    }
    public String getPassword() {
    return password;
    }
    public void setPassword(String password) {
   this.password = password;
    }
    }
  </code></pre>