title: How to get current date from server on jsp or in Struts2
body: <p>i want to get date from server i have tried below code but takes date from current system
  , as i have run my application on different system it gives different result,because system date is different.</p>
  
  <p>My code is:</p>
  
  <pre><code>String date = "yyyy-MM-dd"; 
  Calendar calendar = Calendar.getInstance();     
  SimpleDateFormat dateFormat = new SimpleDateFormat(date);       
  System.out.println("Today Date = "+dateFormat.format(calendar.getTime()));
  </code></pre>
  
  <p>so i am expecting the resulting date from server, not from system as different system has different dates.</p>