<p>I am pulling a long timestamp from a database, but want to present it as a Date using Tags only, no embedded java in the JSP.<br><br> I've created my own tag to do this because I was unable to get the parseDate and formatDate tags to work, but that's not to say they don't work.<br>
<br>
Any advice?</p>

<p>Thanks.</p>

[{'answer_id': 75674, 'author': 'ScArcher2', 'author_id': 1310, 'author_profile': 'https://Stackoverflow.com/users/1310', 'pm_score': 4, 'selected': True, 'text': '<p>The parseDate and formatDate tags work, but they work with Date objects.\nYou can call new java.util.Date(longvalue) to get a date object, then pass that to the standard tag.</p>\n\n<p>somewhere other than the jsp create your date object.</p>\n\n<pre><code>long longvalue = ...;//from database.\njava.util.Date dateValue = new java.util.Date(longvalue);\nrequest.setAttribute("dateValue", dateValue);\n</code></pre>\n\n<p>put it on the request and then you can access it in your tag like this.</p>\n\n<pre><code>&lt;fmt:formatDate value="${dateValue}" pattern="MM/dd/yyyy HH:mm"/&gt;\n</code></pre>\n'}, {'answer_id': 2628641, 'author': 'BenM', 'author_id': 43850, 'author_profile': 'https://Stackoverflow.com/users/43850', 'pm_score': 6, 'selected': False, 'text': '<p>You can avoid having to make any changes to your Servlet by creating a date object within the JSP using the <code>jsp:useBean</code> and <code>jsp:setProperty</code> tags to set the time of newly created date object to that of the time stamp. For example:</p>\n\n<pre><code>&lt;%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %&gt;\n&lt;jsp:useBean id="dateValue" class="java.util.Date"/&gt;\n&lt;jsp:setProperty name="dateValue" property="time" value="${timestampValue}"/&gt;\n&lt;fmt:formatDate value="${dateValue}" pattern="MM/dd/yyyy HH:mm"/&gt;\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/75489', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/9450/']