title: How to convert java.util.date to required format in scriptlet
body: <p>I have a transfer object being returned to the JSP after a search. It is having a <code>java.util.Date</code> field (e.g. <code>private Date issueDate;</code>)</p>
  
  <p>I am accessing the data in TO using <code>usebean</code> tag and displaying the date as:</p>
  
  <pre><code>&lt;INPUT TYPE="text" readonly="readonly" NAME="issueDt" ID="issueDt" 
         SIZE="45" value="&lt;%=mySearchTO.getIssueDt()%&gt;"&gt;
  </code></pre>
  
  <p>However, this is printing the date in the format say for e.g. <strong>MON JAN 31 00:08:00 IST 2011</strong></p>
  
  <p>I want the date to be printed simply as <code>MM/DD/YYYY</code> and in the cases where time is also important, in the <code>MM/DD/YYYY HH:MM</code> format.</p>
  
  <p>How to achieve this inside JSP? I don't know if I need to go for Javascript function or some static Java method.</p>
  
  <p>Please excuse the usage of scriptlet. It's a legacy application and so I can not use EL. 
  Please provide solution through scriptlet only. So solutions like:</p>
  
  <pre><code>&lt;fmt:formatDate value="${new Date(c.dateInIntegerValue)}" 
                  pattern="dd.MM.yyyy hh:mm"/&gt; 
  </code></pre>
  
  <p>available in other questions, will not work for me.</p>
  
  <p>Is the following code valid?</p>
  
  <pre><code>&lt;fmt:formatDate value="&lt;%=mySearchTO.getIssueDt()%&gt;" 
                  pattern="dd.MM.yyyy hh:mm"/&gt; 
  </code></pre>
  
  <p>If yes, how to use it in the JSP? I mean label and all!</p>
  
  <p>Also as far as possible, I want to avoid usage of jquery and such libraries.</p>