File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes difference between getParameter() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "difference between getParameter()" Watch "difference between getParameter()" New topic

difference between getParameter()

naveen jayant

Joined: Jun 11, 2007
Posts: 6
hi i could not understand the difference between the following statement
both produce same result

Ben Souther

Joined: Dec 11, 2004
Posts: 13410

The first (which is called a JSP expression) is shorthand for the second.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Fabian Gutierrez

Joined: Aug 15, 2004
Posts: 22
Thats right,

this is an expresion

this is a scriplet

basically you can use both, however the idea of JSP 2.0 is that you avoid those and instead use EL, for example:



SCJP 1.4, SCWCD 1.4, SCBCD 5, SCJD 5
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Also, I think it's worth pointing out that, in JSP 2.0 neither should be used.
They are both part of the scriptlet syntax.

In JSP 2.0 MVC architecture, JSTL (JavaServer Pages" Standard Tag Library), and EL (Expression Language) have replaced the need for scriptlets altogether.
I agree. Here's the link:
subject: difference between getParameter()
It's not a secret anymore!