aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes jsp scope problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "jsp scope problem" Watch "jsp scope problem" New topic
Author

jsp scope problem

Harshana Dias
Ranch Hand

Joined: Jun 11, 2007
Posts: 327
Hey,

In HFSJ it shows the jsp implicit objects as,

API---------------------------------------Implicit Object

HttpServletRequest--------------------out
PageContext----------------------------pageContext
Object------------------------------------page


1.First of all i am wondering why they use the word API becuase those are just classess know and these out, pageContext are container created objects of those classes right?

2.Secondly when we saying page scope why we are referring pageContext instead of page?
eg:findAtttribute() will first look in pageScope(not page?) then request then session and application.
how is actually the pageScope and page differ?

3.When conside <c:set> if we dont specify the scope it will default take session right? and if it not find in session scope it will only search in the pageScope. is it?
and this is true for both var and target right?
krishna bala
Ranch Hand

Joined: Jul 20, 2009
Posts: 59
http://www.geekmantra.com/subsection.php?section=JSP&subSection=JSP+Basics&permalink=41


check in above link
Harshana Dias
Ranch Hand

Joined: Jun 11, 2007
Posts: 327


Thankx for the link.

It says An object with session scope is bound to the javax.servlet.jsp.PageContex and im wondering not HttpSession?

And i would be happy a fellow rancher can answer because it always makes me more clear with doubts
Himanshu Kansal
Ranch Hand

Joined: Jul 05, 2009
Posts: 257
Harshana wrote:.When conside <c:set> if we dont specify the scope it will default take session right? and if it not find in session scope it will only search in the pageScope. is it?

the converse would be true. page scope is default.

Here are the implicit objects correctly stated:
Object--------------API
out---------------------JspWriter
request----------------HttpServletRequest
response--------------HttpServletResponse
session----------------HttpPSession
application------------ServletContext
config------------------ServletConfig
exception *-----------JspException
(* available to error pages only)




Experience and talent are independent of age
Harshana Dias
Ranch Hand

Joined: Jun 11, 2007
Posts: 327

the converse would be true. page scope is default.


ahh scope is optional right? if we dont specify one it will look in only in page scope know. cool.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jsp scope problem