title: Struts JSP : set textfield value from session information
body: <p>I have a DLPUser object in my session, this DLPUser is basically a container for Strings, ints and some useful info for me.</p>
  
  <p>(this is a fragment of code inside my action class  in java)</p>
  
  <pre><code>Map &lt;String, Object&gt; session = ActionContext.getContext().getSession();
  session.put("logged-in","true");
  session.put("user", user); //user is DLPUser user = new DLPUser();
  </code></pre>
  
  <p>Now I want to show the value of user.getName(); inside a textField in some JSP
  How can I do this?
  I am working with Struts tag and the following didn't work.</p>
  
  <pre><code>&lt;s:textfield label="Name" name="name" value="&lt;% session.user.getName(); %&gt;"/&gt;
  </code></pre>
  
  <p>or </p>
  
  <pre><code>&lt;s:textfield label="Name" name="name" value="#session.user.getName"/&gt;
  </code></pre>
  
  <p>This is supposed to be simple... but I am stuck and cannot find a good reference about this thing in struts and jsp.
  Any Help is very appreciated.</p>