we cant Override Jsp Service method?Why?

Answers were Sorted based on User's Feedback



we cant Override Jsp Service method?Why?..

Answer / deepti

_jspService() method will be written by the container hence
any methods which are not to be overridden by the end user
are typically written starting with an '_'. This is the
reason why we don't override _jspService() method in any
JSP page.

Is This Answer Correct ?    51 Yes 22 No

we cant Override Jsp Service method?Why?..

Answer / gunarathinam

My concern is as previous answer _jspServeice() is wriiten
by container and also in that method all the implicit
objects will be created except request and response. if you
overrirde that method you cant get those object. That is
the reason we cant overrirde service method in jsp.

Is This Answer Correct ?    44 Yes 18 No

we cant Override Jsp Service method?Why?..

Answer / baji

The content what we are written in the JSP will go into
_jspService()method because we are implicitly implemented
it.if we again try to override explicitly, the JSP compiler
given error as " THE METHOD IS ALREADY IMPLEMENTED AND CAN'T
OVERRIDE" but in case of other two methods we are not
implementing it in the jsp.therefore the jsp compiler will
allow we can override jspInit() and jspDestroy().

Any method which are not to be overridden by the end
user are typically written starting with an '_'.

Is This Answer Correct ?    16 Yes 4 No

we cant Override Jsp Service method?Why?..

Answer / smriti

we cant Override Jsp Service method becoz container pepole
have responsbility for override _jspService() method and
implement all logic according to user given data

Is This Answer Correct ?    2 Yes 5 No

Post New Answer

More Servlets Interview Questions

Why servlet is mostly used?

0 Answers  


What is servlet and its advantages?

0 Answers  


What is the major difference between servlet and applet?

0 Answers  


Difference between web container & web server........... Difference between web server & application server?????????

8 Answers   TCS,


Why filter is used in servlet?

0 Answers  






explain the advantages of servlet life cycle?

0 Answers  


How session tracking can be achieved, if your browser doesn't support cookies (or) if cookies are disabled?

2 Answers  


Hi guys.. Well can u tell me that why there is need of "init()" , i mean why can not we initialize the servlet object with the help of constructors? Thank you.

7 Answers  


difference between sendredirect,forward and url rewritting

5 Answers   Patni, TCS,


What is the use of send redirect () method?

0 Answers  


hi actully i hav form columns with origin and destination names .as like as i need to create one more column with name amount. my requirement is when i select origin and destination columns automatically i need to get amount from database.how can i. please tel me with relative code

0 Answers   CTS,


What is the life-cycle of servlets?

0 Answers  


Categories