Friday, August 23, 2013

Hot Deployment/Republishing the JSF Facelet in Tomcat/Eclipse Environment

Today I was trying to update/republish the JSF pages without redeploying in the tomcat server again and again but couldn't get success.

After few minutes of google, I figured what was the issue. In my web application web.xml file, the FACELETS_REFRES_PERIOD is set as -1 as:

    <context-param>
      <param-name>javax.faces.FACELETS_REFRESH_PERIOD</param-name>
      <param-value>-1</param-value>
    </context-param>

I changed it to '1' and also changed
    <context-param>
      <param-name>javax.faces.PROJECT_STAGE</param-name>
      <param-value>Production</param-value>
    </context-param>



to

    <context-param>
      <param-name>javax.faces.PROJECT_STAGE</param-name>
      <param-value>Development</param-value>
    </context-param>

and VOILA! it worked and I am happy. Now I can change the static resources without module redeploy.




Tuesday, August 20, 2013

Configure ssh login information in config file

How to configure the ssh login information in Config file

Usually we connect the remote host using ssh by giving following command in terminal

$ssh -i filename.pem user@ipaddress 

(if there is the pem file for the security key)

Or

$ssh user@ipaddress

Instead of doing this we can add these information in Config file and just type in

$ssh <host>

The config file reside in .ssh/ folder as .ssh/config and add the following:
Host <HostName/AnyName>
HostName <ipaddress>
User <username>
IdentityFile <if there are any pem file> (Optional)

eg:
Host MyHost
HostName 192.168.1.101
User user