Thursday, June 23, 2011
Thursday, June 16, 2011
JSF2 and javascript
<h:outputScript library="js" name="common.js" />
this will create
<script type="text/javascript"
src="/JavaServerFaces/faces/javax.faces.resource/common.js?ln=js"
></script>
common.js file should be reside in resources/js folder
this is from MKYong's blog
Wednesday, June 15, 2011
include local javascript file in ee6 web app for jsp pages
include following code in head or body
<script type="text/javascript" src="http://localhost:8080/JavaEE6Webinar/faces/javax.faces.resource/javascript.js"></script>
<script type="text/javascript" src="http://localhost:8080/JavaEE6Webinar/faces/javax.faces.resource/javascript.js"></script>
xhtml file include js files in ee6
inside h:head include following tags
< h:outputScript name="javascript.js" target="head"> < /h:outputScript>
javascript.js should be inside resources folder,this will be load by javax.faces.resource
when load css file,it should go like this
< h:outputStylesheet name="css/jsfcrud.css"/>
jsfcrud.css file be inside resource/css folder
this piece of code can be put anywhere that use target to put script tag in head or body.
< h:outputScript name="javascript.js" target="head"> < /h:outputScript>
javascript.js should be inside resources folder,this will be load by javax.faces.resource
when load css file,it should go like this
< h:outputStylesheet name="css/jsfcrud.css"/>
jsfcrud.css file be inside resource/css folder
this piece of code can be put anywhere that use target to put script tag in head or body.
Monday, June 13, 2011
install XML Tool in netbean 7
get update plugin from here:http://deadlock.netbeans.org/hudson/job/xml/lastSuccessfulBuild/artifact/build/updates/updates.xml
Friday, June 3, 2011
linux file find method
SEARCH FILE HAS SPECIAL NAME AND SIZE ETC
find -name 'mypage.htm'
In the above command the system would search for any file named mypage.htm in the current directory and any subdirectory.
find / -name 'mypage.htm'
In the above example the system would search for any file named mypage.htm on the root and all subdirectories from the root.
find -name 'file*'
In the above example the system would search for any file beginning with file in the current directory and any subdirectory.
find -name '*' -size +1000k
In the above example the system would search for any file that is larger then 1000k.
find . -size +500000 -print
Next, similar to the above example, just formatted differently this command would find anything above 500MB.
---------------------------------------------------------------------------------------------
SEARCH FILE CONTAIN STRING
Task: Search all subdirectories recursively
You can search for a text string all files under each directory, recursively with -roption:
$ grep -r "redeem reward" /home/tom
Task: Only print filenames
By default, grep command prints the matching lines You can pass -H option to print the filename for each match.
$ grep -H -r “redeem reward” /home/tom
find -name 'mypage.htm'
In the above command the system would search for any file named mypage.htm in the current directory and any subdirectory.
find / -name 'mypage.htm'
In the above example the system would search for any file named mypage.htm on the root and all subdirectories from the root.
find -name 'file*'
In the above example the system would search for any file beginning with file in the current directory and any subdirectory.
find -name '*' -size +1000k
In the above example the system would search for any file that is larger then 1000k.
find . -size +500000 -print
Next, similar to the above example, just formatted differently this command would find anything above 500MB.
---------------------------------------------------------------------------------------------
SEARCH FILE CONTAIN STRING
Task: Search all subdirectories recursively
You can search for a text string all files under each directory, recursively with -roption:
$ grep -r "redeem reward" /home/tom
Task: Only print filenames
By default, grep command prints the matching lines You can pass -H option to print the filename for each match.
$ grep -H -r “redeem reward” /home/tom
Subscribe to:
Posts (Atom)