EL expressions not getting evaluated in JSP pages

EL expressions are quite useful keep your jsps more readable and maintainable. Yesterday I faced a problem with new project. EL expressions in my jsp are not getting evaluated although I have set the attribute in request.

In servlet :
request.setAttribute(message,”Hello World!”);

In JSP :
${message}

On HTML it is being rendered as : ${HTML}

If you are also facing the same problem use following page directive at top of the page :

That will solve the problem.

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