Expression Language ( EL ) in Java.

                                                 Why Expression Language ( EL ) in Java.

Expression language are use to access or retrieve the value  or property from the  Java Managed Bean.

Suppose you have a web page named  ( index.xhtml ) and probably want to access the username from your Java Class  ( App.java ) i.e Your Managed Bean

 

Example

 

2017-01-20-at-14-52-59

 

Why EL in xhtml ( Isn’t that prone to Security attack } ?

The answer to that is :  NO

Is there any other way to use or obtain a value from my Java Class ( Managed Bean ) in my xhtml ?

Yes,  there are ( Depending on the framework you are using to build your app }.

What  is @RequestScoped and Why using it?

@RequestScoped is use when there is a single request in the HTTP

The app contain a single request .

 

Any other type ?

Session scope and Application scope

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

Up ↑

%d bloggers like this: