title: How to provide data model for JSP within a JSP in spring mvc
body: <p>I am facing some issues in providing data model to inner jsp included in jsp itself. I have a controller that points to a jsp ( home.jsp ) which includes another jsp (login_form.jsp) in it self using</p>
  
  <pre><code>&lt;c:import var="data" url="login_form.jsp"/&gt;
  </code></pre>
  
  <p>Using above method works well but i am not able to bind the data required for login_form.jsp.</p>
  
  <p>so i took second approach, make a controller for login_form and use that controller mapping url to include jsp</p>
  
  <pre><code>&lt;c:import var="data" url="/loginform"/&gt;
  </code></pre>
  
  <p>Above solution works and also gives the data model required for login_form.jsp, but in this case login_form is available to public via controller which i don't want.</p>
  
  <p>Any help how to fix this ?</p>