What is the diff. b/w PAGE,APPLICATION and SESSION implicit objects of JSP?

Showing Answers 1 - 6 of 6 Answers

shiv shankar

  • Nov 24th, 2005
 

when ever u use action tag u come accross the scope .in the useBean there is 1 attribute named ID . This means the instance of the class , so the jsp engine will search that instance from least priority to the max priority. First ths least priority is page then request then session and then in the last application. for PAGE it will search the class instance in that current page .for SESSION it will search the class instance in that users session.for APPLICATION it will search the class instance in the entire application i.e entire web module.

  Was this answer useful?  Yes

page: object will be available with in page if we move another page the object will not available.

session : object will be available with in the session (session time out will available in web.xml) after the session time out object will not available .

Application: object will be available until we stop the server

  Was this answer useful?  Yes

B.srinivasarao

  • Mar 3rd, 2006
 

Hi friends

 When we use scope as page the  javabean object is stored in pageContext

object.

When we use scope as session the  javabean object is stored in session

object.

When we use scope as request the  javabean object is stored in request

object.

When we use scope as application the  javabean object is stored in application

object.

when we use one jsp page then scope="page" is enough.

when multiple jsp's involved in processing multiple request's we can use scope="session".where tha data accessed is specific to the client.

when multiple jsp's involved in processing a single request we can use scope="request".

when multiple jsp's involved in processing a single request we can use scope="application".where tha data accessed is not specific to the client.

if there is any questins on j2se,jdbc,servlets,jsp,jndi,java mail api,java bean , plz send that to my mail

id given below------>bora_srinivasarao@yahoo.co.in

  Was this answer useful?  Yes

jayachandiran

  • Apr 6th, 2006
 

hai friend,what is the default session time? and when session will destroy?

  Was this answer useful?  Yes

Madhavikari

  • Apr 20th, 2006
 

These are the scopes of the particular jsp page.

The default scpoe of the jsp page is 'PAGE'

If the jsp page scope is 'Request', the scope is for that particular request.

If the page scope is 'Application', the scope is for entire application.

  Was this answer useful?  Yes

Madhavikari

  • Apr 20th, 2006
 

The default time for session time out is 30 minutes.

If we didn't specify any time, then after 30 mins it will destroy automatically. If we specify -1 then, the session never destroyed. Session timeout can be specified in 2 ways.

1. In cofiguration file we can specify

2.sessionTimeoutInMillis() some method is there. By using this, we can specify the time in milli seconds.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions