Set - 1

Question 6 :

What are the implicit objects?

Answer :

Implicit objects are objects that are created by the web container and contain information related to a particular request, page, or application. They are:
--request
--response
--pageContext
--session
--application
--out
--config
--page
--exception


Question 7 :

How many JSP scripting elements and what are they?

Answer :

There are three scripting language elements:
--declarations
--scriptlets
--expressions


Question 8 :

Why are JSP pages the preferred API for creating a web-based client program?

Answer :

Because no plug-ins or security policy files are needed on the client systems(applet does). Also, JSP pages enable cleaner and more module application design because they provide a way to separate applications programming from web page design. This means personnel involved in web page design do not need to understand Java programming language syntax to do their jobs.


Question 9 :

Is JSP technology extensible?

Answer :

YES. JSP technology is extensible through the development of custom actions, or tags, which are encapsulated in tag libraries.


Question 10 :

Can we use the constructor, instead of init(), to initialize servlet?

Answer :

Yes , of course you can use the constructor instead of init(). There's nothing to stop you. But you shouldn't. The original reason for init() was that ancient versions of Java couldn't dynamically invoke constructors with arguments, so there was no way to give the constructur a ServletConfig. That no longer applies, but servlet containers still will only call your no-arg constructor. So you won't have access to a ServletConfig or ServletContext.