Concatenation of Javascript And Css files

<target name=”js.concatenate”
description=”Concatenates specified JavaScript files”>
<concat destfile=”WebContent/resources/js/minify_jsFile.js”>
<filelist id=”files” dir=”WebContent/resources/*.js”>
</filelist>
</concat>
<echo>Done!</echo>
</target>

You can also give individual file Names :

<target name=”js.concatenate”
description=”Concatenates specified JavaScript files”>
<concat destfile=”WebContent/resources/js/minify_jsFile.js”>
<filelist id=”files” dir=”WebContent/resources/js”>
<file name=”component.js” />
<file name=”functions.min.js” />
<file name=”jquery_custom.js” />
<file name=”jquery.autocomplete.js” />
<file name=”jquery-1.7.1.min.js” />
<file name=”slideshow.js” />
<file name=”util.js” />
<file name=”IE8.js” />
<file name=”time_adjustment.js” />
</filelist>
</concat>
<echo>Done!</echo>
</target>

Read more

J-Sprite Image To form one Image To reduce Number Of Http requests :

Download Jsprite from here download. now rum the following Command To sprite your images : goto the directory where jsprite.jar is placed. java -jar jsprite.jar -d “j-sprite” This command will combine all imges of directory j-sprite to form one image and generate css file .Default image name is sprite.png To use Command Line options Check …

Read more

Minify Javascript and CSS through Apache ant

First configure apache ant in your IDE Eclipse and then create a file with extension .xml

e.g In this Example I create file Build.xml File .

This xml file is the apache ant build file through which ant commands can run although Ant commands can also run from command prompt .

The first thing to do in this file is place a root tag <project></project> and write all code inside this tag . <target> tag is the main tag in which we define our tasks that is to be performed when we run this build file .

Now start Tutorial with the help of some example :

Minify js files :

  1. download yui compresser.jar file  from this link download YUI Compresser.
  2. place it in a directory you want .

<target name=”Minify javascript File”  >
<java jar=”D:\yuicompressor-2.4.6.jar” fork=”true”>
<arg value=”Input-File-name.js” />
<arg value=”-o” />
<arg value=”OutputFile-name.js” />
</java>
</target>

Read more

Apache Ant

Apache ant is a java libraray and comand line tool through which you compile assemble test and run java applications . It can also be used for non java based applications like c and c++.It process files as Target attribute and extension points dependent upon each other . Ant is written in Java. Users of …

Read more

Steps For Self Signed Certifcate For Java Based Application .

First intall JDK and set Environmental PATH. Open Console and Navigate To the directory where keytool.exe file is located Now  Generate .jks file from the comand mention below .

keytool -genkey -alias mydomain -keyalg RSA -keystore keystore.jks -keysize 2048

  • mydomain is the alias Name .
  • keystore.jks is the file Name .

Read more

JQuery DialogBox with Jsf2.0

<ui:composition xmlns=”http://www.w3.org/1999/xhtml” xmlns:ui=”http://java.sun.com/jsf/facelets” xmlns:h=”http://java.sun.com/jsf/html” xmlns:f=”http://java.sun.com/jsf/core” xmlns:rich=”http://richfaces.org/rich” xmlns:a4j=”http://richfaces.org/a4j”> <h:head> <link href=”http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css” rel=”stylesheet” type=”text/css”/> <script src=”JqueryLib/jquery.js”></script> <script src=”http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js”></script> <script src=”http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js”></script> <script src=””></script> <script> $(document).ready(function(){ $(“#press”).click(function(){ $(“#dialog”).dialog();     })     }); </script> </h:head> <body> <form id=”Form1″> <h:outputLabel id=”press” value=”Press me ” outcome=”#”/> <div id=”dialog”  title=”Salam ” style=”display: none”> <h:outputText value=”User Name “/> <h:inputText/><h:outputText value=”Password”/><h:inputSecret/> </div> </form> </body> </ui:composition>

The Fragment Table has Reached its Maximum Threshold 16

The Fragment Table has Reached its Maximum Threshold 16 The Fragment Table has Reached its Maximum Threshold 16, if you are getting this error on your cisco router, please follow the under given instructions. %IP_VFR-4-FRAG_TABLE_OVERFLOW: FastEthernet0/0: the fragment table has reached its maximum threshold 16, if you are getting the above given error on your …

Read more

Difference Between Jsf 1.2 and 2.0

Annotations to replace many faces-config.xml entries :

In JSF, managed bean means this java class or bean can be accessed from a JSF page.

In JSF 2.0, you can use the @ManagedBeanannotation to indicate this is a managed bean.

@ManagedBean(name=””)

@sessionScoped

Write this at the start of the class to indicate that this is managed Bean And can be accessible according to its Scope.

take the bean class name, change the first letter to lower case, and use that as the managed bean name.

Read more