You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Darcy Lewis (JIRA)" <de...@myfaces.apache.org> on 2006/04/10 16:35:59 UTC

[jira] Created: (TOMAHAWK-243) Date format changes when tomahawk.jar is added to the application.

Date format changes when tomahawk.jar is added to the application.
------------------------------------------------------------------

         Key: TOMAHAWK-243
         URL: http://issues.apache.org/jira/browse/TOMAHAWK-243
     Project: MyFaces Tomahawk
        Type: Bug

    Versions: 1.1.1    
 Environment: Windows XP, Eclipse, Tomcat 5
    Reporter: Darcy Lewis


Using Sun's JSF Implementation, adding Tomahawk.jar to an application changes the format of a java.sql.Timestamp.  

Without tomahawk.jar, the date appears as "2006-03-12 15:14:38.0", but with tomahawk.jar in the application's class path, the date becomes "Mar 12, 2006".

Bean:
/*********************************************************************************************/
package com.milsoft.sample;

import java.sql.Timestamp;

public final class TomahawkBug extends Object {

	public TomahawkBug() {
		super();
	}
	
	public Timestamp getDate() {
		Timestamp date;
		date = Timestamp.valueOf("2006-03-12 15:14:38");
		return date;
	}
	
	public void setDate() {
	
	}

}
/*********************************************************************************************/
jsp:
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<base href="<%=basePath%>">
</head>
  
<body>
	<f:view>
		<h:inputText value="#{Sample.date}" />
	</f:view>
</body>
</html>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira