Note that there are some explanatory texts on larger screens.

plurals
  1. POConvert typed-in Text to lowercase
    primarykey
    data
    text
    <p>I've got an index.jsp with</p> <p>[snip]</p> <pre><code>&lt;% String name = request.getParameter("name"); String pass = request.getParameter("pass"); String globalname = "webeng"; String globalpass = "2009"; if (name !=null &amp;&amp; pass!=null &amp;&amp; name.equals(globalname) &amp;&amp; pass.equals(globalpass)) { %&gt; &lt;hr /&gt; &lt;p&gt;&lt;b&gt;Howdy, &lt;%= request.getParameter("name") %&gt;&lt;/b&gt;&lt;/p&gt; &lt;hr /&gt; &lt;% } else if (name !=null | pass!=null &amp;&amp; name.equals("") | pass.equals("")) { %&gt; &lt;hr /&gt; &lt;p&gt;&lt;b&gt;Ooops, one or more fields are empty. Please fill everything out!!&lt;/b&gt;&lt;/p&gt; &lt;hr /&gt; &lt;% } else if (name !=null | pass!=null &amp;&amp; !name.equals(globalname) | !pass.equals(globalpass)) { %&gt; &lt;hr /&gt; &lt;p&gt;&lt;b&gt;Incorrect Userdata!&lt;/b&gt;&lt;/p&gt; &lt;hr /&gt; &lt;% } else{ } %&gt; </code></pre> <p>[snip]</p> <p>Now, the globalname for example is in lowercase "webeng". Folks may type in "WebEng", "webENG", "WEBENG" and variations thereof.</p> <p>I need those typed in Strings converted to lowercase. Somehow</p> <pre><code>String newname = name.toLowerCase(); String newpass = pass.toLowerCase(); </code></pre> <p>is not working. Anybody got any idea?</p> <p>This is what Eclipse tells me when I use</p> <pre><code>&lt;% String name = request.getParameter("name"); String pass = request.getParameter("pass"); String globalname = "webeng"; String globalpass = "2009"; String newname = name.toLowerCase(); String newpass = pass.toLowerCase(); if (name !=null &amp;&amp; pass!=null &amp;&amp; name.equals(globalname) &amp;&amp; pass.equals(globalpass)) { %&gt; &lt;hr /&gt; &lt;p&gt;&lt;b&gt;Howdy, &lt;%= request.getParameter("name") %&gt;&lt;/b&gt;&lt;/p&gt; &lt;hr /&gt; &lt;% } else if (name !=null | pass!=null &amp;&amp; name.equals("") | pass.equals("")) { %&gt; &lt;hr /&gt; &lt;p&gt;&lt;b&gt;One or more fields are empty!&lt;/b&gt;&lt;/p&gt; &lt;hr /&gt; &lt;% } else if (name !=null &amp;&amp; pass!=null &amp;&amp; !name.equals(globalname) | !pass.equals(globalpass)) { %&gt; &lt;hr /&gt; &lt;p&gt;&lt;b&gt;Incorrect Userdata!&lt;/b&gt;&lt;/p&gt; &lt;hr /&gt; &lt;% } else{ } %&gt; </code></pre> <p>Eclipse: <a href="http://i.imagehost.org/0277/2009-11-15_19_34_00.png" rel="nofollow noreferrer">http://i.imagehost.org/0277/2009-11-15_19_34_00.png</a></p>
    singulars
    1. This table or related slice is empty.
    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.
 

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