File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes page language Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "page language" Watch "page language" New topic

page language

Harikrishna Gorrepati
Ranch Hand

Joined: Sep 23, 2010
Posts: 423
Hi, What is the use of saying <%@page language="java" %> ? We are not using Javascript or ASP or C language here..Do we ever use besides java? Even if I remove, I don't see any effect.

OCPJP 6.0-81% | Preparing for OCWCD | |
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63865

Back in the Ice Ages, when it was appropriate to include scriptlets in a JSP, this was intended to identify the scripting language, just in case any other language was ever supported in scripted pages.

Luckily, before that could happen, scriptlets went out of vogue and have been replaced by the JSTL and EL.

So the directive is doubly useless nowadays because:
  • No language but Java ever ended up being supported.
  • Even Java is no longer used in JSP pages.

  • [Asking smart questions] [About Bear] [Books by Bear]
    I agree. Here's the link:
    subject: page language
    It's not a secret anymore!