Monthly Archives: November 2014

JSF convertDateTime timeZone error fix

To show corrent date JSF with convertDateTime you can use next:

<context-param> 
  <param-name>
    javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE
  </param-name> 
  <param-value>
    true
  </param-value> 
</context-param>

So, in page:

<h:outputText value="#{Bean.date}">
  <f:convertDateTime pattern="HH:mm:ss"/>
</h:outputText>

Thanx to http://stackoverflow.com/a/7491706 !

Could not transfer artifact with Maven

mvn
You may see the error when try to make maven project:
Could not transfer artifact Connection refused: connect

The problem may be with your internet connection and can be fixed by adding the following settings in maven settings.xml file (for windows: %USERPROFILE%\.m2 folder):


        
            true
            http
            your_proxy_host
            your_proxy_port
            
        
    

Thanx to http://stackoverflow.com/a/16729906.