File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes JSP Implicit objects Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "JSP Implicit objects" Watch "JSP Implicit objects" New topic
Author

JSP Implicit objects

Tyronne Fernando
Ranch Hand

Joined: May 11, 2008
Posts: 50
Just want to know the implicit objects (request, response, application, etc.) that are available for JSP are only available for scriplets and expressions?

That means the implicit objects are not available for declarations in JSP.

I came to this conclusion by looking at a generated servlet from a JSP. The implicit objects were declared inside the _jspService() method.

Is this correct? Thanks in advance.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60766
    
  65

Yes. Think about it for a minute -- as declarations are created at class level outside of the service method, what meaning would an implicit object like request have?

P.S. At this point in time you should already have transitioned away from scriptlets and declarations and be using the JSTL and EL in scriptless JSP pages.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSP Implicit objects
 
Similar Threads
translation unit of jsp
Implicit and Explicit Objects
Implicit Objects doubt!
Implicit Objects available in Tag Files
implicitObjects available to the tag file?