title: How to pass parameter from an action class to a JSP with Struts2?
body: <p>I'll try to explain my question with an example. I'm making a login page. I pass a username and password from the index-page to an action class for verification. If everything's okay, then using the strus.xml, I open a new JSP. Now, I wan't to display the name of the user who just logged in on the new JSP. Here's an example struts.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE struts PUBLIC
      "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
      "http://struts.apache.org/dtds/struts-2.0.dtd"&gt;
  &lt;struts&gt;
      &lt;package name="login" extends="struts-default"&gt;
          &lt;action name="tryLogin" class="action.LoginAction"&gt;
              &lt;result name="success" &gt;/success.jsp&lt;/result&gt;
              &lt;result name="login"&gt;/login.jsp&lt;/result&gt;
              &lt;result name="input"&gt;/login.jsp&lt;/result&gt;
          &lt;/action&gt;
      &lt;/package&gt;
  &lt;/struts&gt;
  </code></pre>