Recently in an interview i have been asked a question "how to disable the implicit objects in the jsp so that developer himself can create the objects whenever it is required, in other way how to restrict the container not to create the JSP implicit objects". Is it possible to restrict the container not to create the implicit objects? I would really like to know the answer for this.
I think he's referring to the various objects like request, response, session, page, etc. that the container makes available without explicit declaration. If you're going to disable these (assuming that's even possible) then you might as well write a static HTML page instead of a JSP. Where do interviewers come up with these fringe questions?
syed yousuf wrote:I don't think we can disable Implicit objects from JSP Container.
I don't think we [i]should.[/b] Whatever they are supposed to be.
At any rate it's a good interview question. It shows that this shop is controlled by people who think that they are cleverer than they are and that you'll almost certainly be happier somewhere else. If for no other reason than not being there to blame when all this "clever" ends up being more trouble than it's worth.