Khaled Rihane

How to Format/Delete LVM partition

If it's an LVM partition, you will need to deactivate it using the command lvremove which will remove the lock.
Only then can you delete the partition using gparted.

Use lvscan to view the volume.

Use lvremove to remove it.

Check man pages man lvscan and man lvremove for details.


27/06/2014
0 Poster un commentaire

قال ابن القيم رحمه الله

قال ابن القيم رحمه الله 

أربعة أشياء تُمرض الجسم 

الكلام الكثير * النوم الكثير * والأكل الكثير *الجماع الكثير 

وأربعة تهدم البدن 

الهم * والحزن * والجوع * والسهر

وأربعة تيبّس الوجه وتذهب ماءه وبهجته 

الكذب * والوقاحة * والكثرة السؤال عن غير علم * وكثرة الفجور 

وأربعة تزيد في ماء الوجه وبهجته 

التقوى * والوفاء * والكرم * والمروءة 

وأربعة تجلب الرزق 

قيام الليل * وكثرة الاستغفار بالأسحار * وتعاهد الصدقة * والذكر أول 
النهار وآخرة 




وأربعة تمنع الرزق 

نوم الصبحة * وقلة الصلاة * والكسل * والخيانة 

 


06/02/2014
0 Poster un commentaire

Templating with JSF2.0 Facelets

Introduction

In JavaServer Faces (JSF) 2.0, Facelets is the default view declaration language (VDL) instead of JavaServer Pages (JSP). With Facelets, you don’t need to configure a view handler as you used to do in JSF 1.2. Facelets is a JSF-centric view technology.

Facelets is based on compositions. A composition defines a JSF UIComponents structure in a Facelets page. A Facelets application may consist of compositions defined in different Facelets pages and run as an application.

Facelets is a templating framework similar to Tiles. The advantage of Facelets over Tiles is that JSF UIComponents are pre-integrated with Facelets, and Facelets does not require a Facelets configuration file, unlike Tiles, which requires a Tiles configuration file. 

JSF Validators and Converters may be added to Facelets. Facelets provides a complete expression language (EL) and JavaServer Pages Standard Tag Library (JSTL) support. Templating, re-use, and ease of development are some of the advantages of using Facelets in a Web application.

In this article, we develop a Facelets Web application in Oracle Enterprise Pack for Eclipse 11g and deploy the application to Oracle WebLogic Server 11g. In the Facelets application, an input text UIComponent will be added to an input Facelets page. With JSF navigation, the input Facelets page is navigated to another Facelets page, which displays the JSF data table generated from the SQL query specified in the input Facelets page. We will use Oracle Database 11g Express Edition for the data source. Templating is demonstrated by including graphics for the header and the footer in the input and the output; the graphics have to be specified only once in the template.

Note: The source code for the Facelets Web application developed in this article can be downloaded here.

Overview of Facelets Technology

Before we develop the application, let’s review the Facelets technology. Facelets tags are used with the JSF Core and JSF HTML tag libraries to develop a JSF Facelets application. Some of the Facelets tags are discussed in Table 1.

Table 1. Facelets Tags

Facelets Tag

Description

Attributes

ui:composition

Defines a composition of UIComponents. A composition may consist of multiple UIComponents. Text not within ui:composition tags is not compiled in a Facelets page.

template: Optional attribute that specifies the template to use for adding UIComponents within a composition.

ui:define

Used in a Facelets page to add content with a template.

name: A required attribute; matches the name attribute in ui:insert.

ui:decorate

Similar to ui:composition except that text not within the ui:decorate tags is included in the Facelets page.

template: A required attribute that specifies the template to use for adding UIComponents in ui:decorate tags.

ui:component

Similar to ui:composition except adds a new UIComponent as the root component in the UIComponents structure.

id: If not specified, Facelets assigns an ID.

binding: Binds a UIComponent to a property of a JavaBean.

ui:fragment

A nontrimming tag for ui:component, similar to the ui:decorate tag for ui:composition.

id: If not specified, Facelets assigns an ID.

binding: Binds a UIComponent to a property of a JavaBean.

ui:include

Includes a Facelets page that defines a composition or a component in a Facelets page or the template page.

src: A required attribute that specifies the target Facelets page to include with an EL expression or a string literal.

ui:insert

Used in a template to define the layout of Facelets pages that use the template for defining UIComponents. A template client adds UIComponents to a Facelets page with corresponding ui:define tags. If a Facelets page specifies a template and it does not specify ui:define tags corresponding to ui:insert tags, the default ui:insert tags are used in the Facelets page.

name: An attribute that has a corresponding name attribute in a Facelets page’s ui:define tag for matching a template with a Facelets page.

ui:param

Specifies a variable when a Facelets page is included within a template or a Facelets page. 

name: Required attribute that specifies the variable name.

value: Required attribute that specifies the variable’s value as an EL expression or literal. 

Facelets pages are XHTML pages by default. A Facelets application consists of the following configuration and templating files.

  • A Facelet Template file, which is an XHTML page
  • Facelet Header and Facelet Footer XHTML pages
  • A JSF configuration file, faces-config.xml
  • Facelet Composition page, which is also an XHTML page

The template file defines the layout in Facelets and consists of <ui:insert/> tags to specify the structure of a Facelets composition that uses the template for defining UIComponents. 

The JSF configuration file is the only configuration file required; a Facelets configuration file is not required. A Facelets page is an XHTML page that includes tags in the Facelets namespace.

In the following sections, we create a Facelets application in Oracle Enterprise Pack for Eclipse 11g, Oracle WebLogic Server 11g, and Oracle Database 11g Express Edition.

Other Links:

http://www.mkyong.com/jsf2/jsf-2-templating-with-facelets-example/


05/09/2013
0 Poster un commentaire

JEE Interview Questions and answers

Aide mémoire Java

http://www.ncottin.net/download/ServletsJSP.pdf

 

 

http://www.fresherventure.net/frequently-asked-j2ee-interview-questions-and-answers/

 

 

http://inheritingjava.blogspot.com/p/javaj2ee-interview-questions-with.html

 

Design Pattern:

http://www.vogella.com/designpattern.html

http://www.vogella.com/articles/DesignPatterns/article.html

 


09/07/2013
0 Poster un commentaire

TOMCAT CONFIGURATION IN ECLIPSE INDIGO

 

Without a tomacat plugin eclipse can not understand the tomcat. To configure it follow the below steps.

1.

Strat your eclipse

2. See in the toolbar there is no tomcat icon, because we dont have a plugin for it.

No icon in the top menu bar

3. Download the plugin here.

4. Unzip the file and paste to your eclipse\plugins directory.

paste unzip plugin folder here

5. Restart the eclipse now.

6. Now you can see the tomcat icon on the menu bar.

See the tomcat icons are appearing now

7. Now go to window->Preference . Find out Tomcat configuration from the left panel.

Go to preference

8.

Configure tomcat now

Choose your tomcat version and browse the tomcat home.

Press  OK to save all those  configuration.

Now you just configured your eclipse for tomcat.


28/04/2013
0 Poster un commentaire