As we all know every jsp is converted in to servlet
when in write jsp declration tag <%! public void a(){} %>
this will go into init() method of servlet
but when i write Expression <% public void a(){} %>
this will go into service() method of servlet
in expression tag it ie.service() shows error illegal start of expression .....
why it doesnt show in init() method the same error because even init() is a method.
when in write jsp declration tag <%! public void a(){} %>
this will go into init() method of servlet
but when i write Expression <% public void a(){} %>
this will go into service() method of servlet
in expression tag it ie.service() shows error illegal start of expression .....
why it doesnt show in init() method the same error because even init() is a method.