Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Your intuition is right, you should be getting "foo@bar.com". With the following test of struts version 2.0.14 I could enter !@#$#$^$&amp;%#$%&amp; into a from and display it on another page without issue.</p> <p>I tested a bare bones struts 2.0.14 application with a form that takes a string:</p> <pre><code>&lt;s:form action="form-view.action" method="GET"&gt; &lt;s:textfield label="email" name="email"/&gt; &lt;s:submit/&gt; &lt;/s:form&gt; </code></pre> <p>A basic action class (note with stuts2 at this version you don't need setters/getters):</p> <pre><code>package struts2; import com.opensymphony.xwork2.ActionSupport; public class FormViewAction extends ActionSupport{ public String email; } </code></pre> <p>And a very basic display page containing:</p> <pre><code>&lt;s:property value="email"/&gt; </code></pre> <p>Here is the struts.xml:</p> <pre><code>&lt;struts&gt; &lt;constant name="struts.enable.DynamicMethodInvocation" value="false" /&gt; &lt;constant name="struts.devMode" value="true" /&gt; &lt;package namespace="" name="example" extends="struts-default"&gt; &lt;action name="form-view" class="struts2.FormViewAction"&gt; &lt;result&gt;/form-view.jsp&lt;/result&gt; &lt;/action&gt; &lt;/package&gt; &lt;/struts&gt; </code></pre> <p>There must be a configuration issue... Are you building with maven? Why are you using version 2.0.14 instead of 2.2.1? Just as an aside I down-graded a test application from 2.2.1 down to 2.0.14 and this took my about 5 min to do. I don't think there are any serious impediments from upgrading to the current version which will give you up to date documentation.</p> <p>I ran this on Glassfish 3.0.1.</p> <p>If you are not building with maven please list the jars in your library, your web.xml and struts.xml files and if possible a minimal form.jsp, display.jsp and an Action class to reproduce the issue. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload