Jump to content
xisto Community
Sign in to follow this  
andrewsmithy

Jsp 2.0 Or 1.2 What is new in JSP 2.0

Recommended Posts

I was wondering if someone could explain to me the differences / upgrades that are in JSP 2.0 over JSP 1.2. If someone could tell me what's new, or some websites to go to, it would be much appreciated. Thank you for your help.

Share this post


Link to post
Share on other sites

The major change in JSP 2.0 over JSP 1.2 is the introduction of EL(expression language).

To control the EL u use the attribute in the page tag.

<%@ page isELEnabled="true|false"%>

The syntax of EL is :
${expr}


where expr can be any valid expresion like boolean, integer, float, String or null.
It can be used to refer to implicit objects available in the jsp page, just like those available in scriptlets.

These are:

1. pageContext
2. param
3. paramValues
4. header
5. headerValues
6. cookie
7. pageScope
8. requestScope
...

The variables and methods of these objects can be accessed directly.

${param.name} <=> request.getParameter(name)

also it can be used as ${6*3}, gives 18.

It is a powerful language, intended to reduce the use of scriptlets in the JSP file so as to completely separate the presentation and business logic.

Other features include
--> JSP fragments
--> Tag files
--> Simple Tag Handlers ( implementing the SimpleTag interface)

I would post more detailed info as soon as I am able to.

The best reference for this specification would be :
http://forums.xisto.com/no_longer_exists/

Also, finally there is always GOOGLE..... :) have fun

Cheers.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.